Closed Bug 391710 Opened 17 years ago Closed 17 years ago

checksetup.pl fails when fixing broken series due to BUG_STATE_OPEN pointing to the not yet created bug_status.is_open column

Categories

(Bugzilla :: Database, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: altlist, Assigned: LpSolit)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: 

checksetup fails in Bugzilla::Install::DB::_fix_broken_all_closed_series().  This function calls BUG_STATE_OPEN, which assumes bug_status.is_open exists.  

However, bug_status.is_open doesn't get added before the _fix_broken_all_closed_series() call.  It gets add several blocks later, in the Install::DB::_initialize_workflow.

Also, the column should be added before _copy_old_charts_into_database()

Reproducible: Always
Summary: checksetup fails when upgrading from to the new workflow → checksetup fails when upgrading to the new workflow
Attached patch v1 (obsolete) — Splinter Review
Attachment #276146 - Flags: review?(LpSolit)
Comment on attachment 276146 [details] [diff] [review]
v1

No, this isn't the right fix.

You have to manually add the right set of statuses into Install::DB instead of using a function that depends on the database.
Attachment #276146 - Flags: review?(LpSolit) → review-
Version: unspecified → 3.1
Oops.  Is it sufficient to just move up the _initialize_workflow function?
No, changing the order of things isn't the solution. You have to replace the call to BUG_STATE_OPEN with the former contents of BUG_STATE_OPEN before custom workflow existed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch patch, v2Splinter Review
Both BUG_STATE_OPEN and is_open_state() are evil in Bugzilla::Install::DB as they don't reflect the real list of open bug statuses at the time of the upgrade. So replacing these calls by a hardcoded list of bug statuses is a good thing anyway, and fixes this bug as well. I checked in bug 282628 (and some others) that BUG_STATE_OPEN was is this exact order.
Assignee: database → LpSolit
Attachment #276146 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #277021 - Flags: review?(mkanat)
Target Milestone: --- → Bugzilla 3.2
Comment on attachment 277021 [details] [diff] [review]
patch, v2

Looks good to me. :-)
Attachment #277021 - Flags: review?(mkanat) → review+
Flags: approval+
Checking in Bugzilla/Install/DB.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/DB.pm,v  <--  DB.pm
new revision: 1.40; previous revision: 1.39
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Summary: checksetup fails when upgrading to the new workflow → checksetup.pl fails when fixing broken series due to BUG_STATE_OPEN pointing to the not yet created bug_status.is_open column
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: