Closed
Bug 991477
Opened 10 years ago
Closed 10 years ago
changing a tracking flag's value doesn't result in the value being updated on bugs
Categories
(bugzilla.mozilla.org :: Extensions, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: glob, Assigned: glob)
References
Details
Attachments
(1 file)
2.29 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
steps: - create a tracking flag with a value of "1.0" - set the value on a bug to "1.0" - edit the value with via admin and change it to "2.0" - view the bug expected: - value shown on bug as "2.0" actual: - value shown on bug as "---" the tracking_flags_bugs contains the old value, and as this isn't present in the select it's reverting to the default value of "---". when a value is renamed we should update all values in tracking_flags_bugs to match.
Attachment #8401094 -
Flags: review?(dkl)
Comment 2•10 years ago
|
||
Personally the OC side of me would rather see the value varchar in tracking_flags_bugs become a value_id column linked to tracking_flags_values using a foreign key instead of manually updating all rows of the table that have an old string value to a new one. I realize this would require an increase in the amount of code change and all of the testing/debugging and regression checking that would come with it. I could work on a patch for that now and we see the amount of work needed. Also I could just review this to get the issue fixed or now and revisit this at a later time when we have some spare cycles. Thought? dkl
Comment 3•10 years ago
|
||
Comment on attachment 8401094 [details] [diff] [review] 991477_1.patch Review of attachment 8401094 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl ::: extensions/TrackingFlags/lib/Admin.pm @@ +342,5 @@ > + my $old_value = $value_obj->value; > + if ($object_set->{value} ne $old_value) { > + $value_obj->set_all($object_set); > + $value_obj->update(); > + Bugzilla::Extension::TrackingFlags::Flag::Bug->update_all_values({ Nit: Why wouldn't this just be part of Bugzilla::Extension::TrackingFlags::Flag::Value instead of Bugzilla::Extension::TrackingFlags::Flag::Bug since it is not really bug specific?
Attachment #8401094 -
Flags: review?(dkl) → review+
(In reply to David Lawrence [:dkl] from comment #2) > I realize this would require an increase in the amount of code change > and all of the testing/debugging and regression checking that would come with it. i think that change would only be worth the effort if it provides performance improvements. (In reply to David Lawrence [:dkl] from comment #3) > Nit: Why wouldn't this just be part of > Bugzilla::Extension::TrackingFlags::Flag::Value instead of > Bugzilla::Extension::TrackingFlags::Flag::Bug since it is not really bug > specific? it's under Flag::Bug because it updates the tracking_flags_bugs table, which Flag::Bug "owns".
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git 13408dc..92c46e3 4.2 -> 4.2
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: Extensions: TrackingFlags → Extensions
You need to log in
before you can comment on or make changes to this bug.
Description
•