Bug 206339

Summary: Inconsistent BUG status (Header:In Progress but already Closed)
Product: Services Reporter: Olli Hauer <ohauer>
Component: Bug TrackerAssignee: Oleksandr Tymoshenko <gonzo>
Status: Closed FIXED    
Severity: Affects Only Me CC: bugmeister, gonzo
Priority: ---    
Version: unspecified   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=157554
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=129923
Attachments:
Description Flags
list_inconsistent_states.pl
none
feedback_and_suspended.csv none

Description Olli Hauer freebsd_committer freebsd_triage 2016-01-17 17:14:22 UTC
I notice a strange inconsistent Bug status in PR 157554

The status in the Heading displays "In Progress" but the bug is already Closed.
Looking at the history, the status was at no time "In Progress".

Perhaps this is an issue from the gnats => bugzilla convert?

I could close the PR but perhaps it is an example for the bugzilla team to find additional issues.
Comment 1 Olli Hauer freebsd_committer freebsd_triage 2016-01-17 17:30:34 UTC
Found an additional one, PR 129923

status In Progress should be Closed.

I suspect there are many more, perhaps they can be found with a SQL query
Comment 2 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-02-12 01:12:49 UTC
Looks like it's an artifact of GNATS to Bugzilla conversion. Looks like there were two separate paths for status translation. On was in transitions parser: if last transition in GNATS status was "open" to "feedback" or open to "suspended" it was recorded as "Open" to "Closed". The other was in bugs fields mapping where "feedback" and "suspended" were mapped to "In Progress"
Comment 3 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-05-04 20:38:15 UTC
Created attachment 193050 [details]
list_inconsistent_states.pl

Find all bugs with inconsistency between current bug state and a new state in latest transition
Comment 4 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-05-04 22:43:17 UTC
Created attachment 193052 [details]
feedback_and_suspended.csv

List of bugs with current status "In Progress" but the latest transition to "Closed"
Comment 5 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-05-04 23:04:04 UTC
I fixed bugs with "Closed"/"In Progress" inconsistency, 180 in total. They all were caused by the same discrepancy between mappings in transitions and final state handling code paths. The fix was to change new state in transition to "In Progress" instead of "Closed" because it's more suitable for "suspended" or "feedback" status