Project

General

Profile

Actions

Defect #18921

open

Changing Tracker w/o Boolean to the one w/Boolean ignores default value of Boolean custom field definition.

Added by kaz k almost 10 years ago. Updated almost 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Suppose there are 2 trackers. One (called as A) does not have the boolean custom field. The other (called as B) has the boolean custom field.
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.
  1. Boolean with "Required" - Yes
  2. Boolean without "Required" - (null, blank)
It is misleading if the default value of the boolean is "No", for example.
  • 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.
    1. 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
      
    2. 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
      
Actions #1

Updated by kaz k almost 10 years ago

Combinations tested: 5
  • 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?).

According to the test above, it seems that regardless of the default definition, initial value of the boolean field is as follows.
  • Boolean with "Required" - Yes
  • Boolean without "Required" - (null, blank)

Hope this helps.

Actions

Also available in: Atom PDF