Opened 8 years ago
Closed 8 years ago
#11996 closed defect (fixed)
incorrect milestone pre-selected in change properties dropdown menu when empty
|Reported by:||Owned by:||Ryan J Ollos|
Fixed: default milestone selected after ticket creation when milestone empty.
Since Trac uses the null value to represent empty properties in the database, when the milestone of a ticket is empty, the milestone dropdown menu in the change properties area has the default milestone pre-selected instead of the empty one.
A visible effect is that if you simply want to add a comment on such a ticket, the milestone will be changed from empty to the default milestone, which is not empty in our case.
This does not happen on tickets that have an empty milestone represented as an empty string.
It also happens with the version property.
This happens because of the
get_value_or_default() function in
I believe the line:
return value if value is not empty else self.get_default(name)
return value if value is not empty else ''
This function is called only in
trac/ticket/templates/ticket.html to fill the ticket's fields.
Change History (5)
comment:1 by , 8 years ago
|Status:||new → assigned|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
yes, it's probably better this way!
comment:4 by , 8 years ago
|Release Notes:||modified (diff)|
Proposed changes in log:rjollos.git:t11996.
comment:5 by , 8 years ago
|Status:||assigned → closed|
Committed to 1.0-stable in , merged to trunk in [13945:13946]
I can reproduce the issue on 1.0-stable as well, I think it's not related to #11018.