プロジェクト

全般

プロフィール

Vote #75970

未完了

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

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Custom fields_14
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
14
version_id:
0
issue_org_id:
18921
author_id:
119181
assigned_to_id:
0
comments:
1
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
75
ステータス-->[New]

説明

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.

Boolean with "Required" - Yes

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. # 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
    

journals

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.

--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリCustom fields_14 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0