Defect #18921
openChanging Tracker w/o Boolean to the one w/Boolean ignores default value of Boolean custom field definition.
0%
Description
There is a ticket in the tracker in the tracker A.
When the ticket in tracker A (without the boolean field used) is moved to tracker B (which has the boolean field) while editing the ticket, the boolean field appears in the editing screen (good), but the default value of the boolean field is ignored :-(.
Regardless of the default definition, initial value of the boolean field is as follows.
- Boolean with "Required" - Yes
- Boolean without "Required" - (null, blank)
- Users rely on the default value of the boolean of "No" and may not take much care the field value because they know the default value is "No".
- "No" is set initially when they create the ticket in Tracker B .
- If the user changes the tracker in tracker A to tracker B, does not check the value carefully, and submits the update, the ticket has the value of "Yes" which is not intended so.
It is better to assign the default value as an initial value in this case.
I evaluated combinations of the boolean value definitions and behavior of changing the tracker. Details are to be added in the note in this ticket.
I am afraid that the same phenomena happens if a boolean field is added to the tracker then edit existing tickets, because the existing tickets don't have the boolean value before adding it.
- Reported version
Redmine 2.5.0.stable.
Details are as follows. - Test redmine (Windows7)
Environment: Redmine version 2.5.0.stable Ruby version 1.9.3-p231 (2012-05-25) [i386-mingw32] Rails version 3.2.17 Environment production Database adapter Mysql2
- Production redmine (Linux)
Environment: Redmine version 2.5.0.stable Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux] Rails version 3.2.17 Environment production Database adapter PostgreSQL
Updated by kaz k almost 10 years ago
- Boolean value Definition
- "Required" or not
- Default value:
- Yes/No when "Required"
- Yes/No/(null) when not "Required"
I made tickets in Tracker A and moved to Tracker B. I iterated it while changing the definition of the boolean value.
Here is the summary table below.
defined as "Required" or not | Deafult value definition | when changing the tracker (note 1) | evaluation (note 2) |
"Required" | No | Yes | NG (?) |
"Required" | Yes | Yes | OK |
not required | (null) | (null) | OK |
not required | No | (null) | NG (?) |
not required | Yes | (null) | NG (?) |
note 1: when the tracker is changed to Tracker B, value is set initially and automatically.
note 2: evaluation column shows that initial value matches to the default(OK) or not (NG?).
- Boolean with "Required" - Yes
- Boolean without "Required" - (null, blank)
Hope this helps.