Defect #9737

Custom values deleted before issue submit

Added by Damián Farina almost 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Custom fields
Target version:1.2.3
Resolution:Fixed Affected version:1.1.1

Description

Working on a custom implementation of RedMine, we found that if the user tries to change the tracker of a issue but do not save the modifications after all, custom values that belongs to the old tracker, but not to the new one, are removed. No history neither.

How to reproduce it:
  1. create tracker 1 with custom field A
  2. create tracker 2 with custom field B
  3. create an issue with tracker 1, assign a value to custom field A
  4. edit the issue
  5. change tracker to tracker 2
  6. DO NOT SAVE and refresh the page
    custom field A is empty

The attached patch worked for us, it needs some testing though
I'm testing in redmine-1.1.1 but the code looks the same in newer versions

save_custom_values_after_customized_is_saved.diff Magnifier (1.38 KB) Damián Farina, 2011-12-06 17:53

Associated revisions

Revision 8103
Added by Jean-Philippe Lang almost 6 years ago

Fixed that custom values get saved when assigning custom values after changing to a tracker with different custom fields (#9737).

Revision 8114
Added by Jean-Philippe Lang almost 6 years ago

Merged r8103 from trunk (#9737).

Revision 8157
Added by Jean-Philippe Lang almost 6 years ago

Merged r8103 from trunk (#9737).

History

#1 Updated by Jean-Philippe Lang almost 6 years ago

  • Category set to Custom fields
  • Status changed from New to Confirmed
  • Assignee set to Jean-Philippe Lang

#2 Updated by Jean-Philippe Lang almost 6 years ago

  • Status changed from Confirmed to Resolved
  • Target version set to 1.3.0

Good catch, this should be fixed in r8103.

#3 Updated by Etienne Massip almost 6 years ago

Why not 1.2?

#4 Updated by Jean-Philippe Lang almost 6 years ago

  • Target version changed from 1.3.0 to 1.2.3

I didn't want to take any risk with 1.2-stable but yes, this should be merged.

#5 Updated by Bruno Medeiros almost 6 years ago

People, is it merged on 1.3-stable?

#6 Updated by Bruno Medeiros almost 6 years ago

Oh, sorry for the question.. r8114 merges on 1.3-stable, and the ticket is not closed because it is nor merged on 1.2 yet.

#7 Updated by Jean-Philippe Lang almost 6 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed

Merged in 1.2-stable.

Also available in: Atom PDF