Closed Bug 325048 Opened 19 years ago Closed 19 years ago

[PostgreSQL] Changing the status of a bug from UNCO to NEW or ASSIGNED sets everconfirmed to 1 but leave the status as UNCONFIRMED

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.21
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.22

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Attachments

(1 file)

I cannot reproduce on MySQL, but both qa222pg and my local Pg installations are affected.

Step to reproduce:

- Open a bug as UNCONFIRMED;
- Click " Accept bug (confirm bug, and change status to ASSIGNED) "
- Submit
- Look at the bug activity: everconfirmed = 1 as expected, but status still as UNCONFIRMED!
And of course, sanitycheck.cgi complains:

Bugs that are UNCONFIRMED but have everconfirmed set: 2653, 2654, 2655
Flags: blocking2.22?
Interesting: if you come back to the bug and click "Accept bug" again, then it becomes ASSIGNED:

LpSolit@netscape.net 2006-01-28 17:38:14 CET Ever Confirmed 0 1
LpSolit@netscape.net 2006-01-28 17:38:24 CET Status UNCONFIRMED ASSIGNED

Note the delay of 10 seconds, which is the time I needed to come back to the page and click on "Accept bug" again.
OK, the bug also appears when changing the bug status from UNCO to NEW.

I suspect the problem comes from ChangeStatus() in process_bug.cgi due to:

    $::query .= "bug_status = CASE WHEN bug_status IN($open_state) THEN " .
                                "(CASE WHEN everconfirmed = 1 THEN " .
                                    SqlQuote($str) . " ELSE " .
                                    " 'UNCONFIRMED' END) ELSE " .
                                "bug_status END";

Probably PostgreSQL is unable to change everconfirmed from 0 to 1 and update the bug status based on this change at the same time, i.e. for PostgreSQL, everconfirmed is still 0 when it does this check.
Probably also that MySQL realizes it is updating everconfirmed to 1 and so has to take this update into account when determining the new bug status.

I have no better conclusion. mkanat?
Summary: [PostgreSQL] Changing the status of a bug from UNCO to ASSIGNED sets everconfirmed to 1 but leave the status as UNCONFIRMED → [PostgreSQL] Changing the status of a bug from UNCO to NEW or ASSIGNED sets everconfirmed to 1 but leave the status as UNCONFIRMED
Flags: blocking2.22? → blocking2.22+
Attached patch patch, v1Splinter Review
We cannot release 2.22rc1 without this fix IMO. Tested on both MySQL and PostgreSQL.
Assignee: create-and-change → LpSolit
Status: NEW → ASSIGNED
Attachment #211026 - Flags: review?(mkanat)
Comment on attachment 211026 [details] [diff] [review]
patch, v1

Yep, works. Tested on landfill.
Attachment #211026 - Flags: review?(mkanat) → review+
Flags: approval?
Flags: approval? → approval+
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.302; previous revision: 1.301
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: