Bug 1823503 - After add comment, sometimes all status flags are changed to fixed
by itself.
#2042
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Although I was never able to reproduce this reliably in production and not at all locally, there were some areas that could use some fixing to reduce overlap and possible conflict.
BugModal was utilizing TrackingFlags code to load the tracking flags instead of loading the data itself. TrackingFlags/Extension.pm therefore could have been loading flag data incorrectly for the wrong bug and/or with incorrect current values. And then passing it along to BugModal/Extension.pm.
This change makes makes BugModal load flag data itself. TrackingFlags is only needed for loading the tracking_flag_json which is used for tracking flag mandatory comments.
I also refactored BugModal to simplify the data sent along to the template instead of passing full flag objects. This will make it simpler in the future to debug what the data looks like that is being passed.