Closed
Bug 718183
Opened 13 years ago
Closed 13 years ago
Rename duplicated series names before inserting the new index in the series table
Categories
(Bugzilla :: Installation & Upgrading, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file, 1 obsolete file)
1.89 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
The code doesn't expect to have two series with the same name under the same category/subcategory. This has been enforced in the DB in bug 451735. But there are some installations (based on the feedback we got in the support mailing-list) which have duplicated names for the same category/subcategory created by different users. This means that when they upgrade to Bugzilla 4.2, checksetup.pl will complain with an error of the form:
DBD::mysql::db do failed: Duplicate entry '92-4-All Open' for key 2 [for
Statement "CREATE UNIQUE INDEX `series_category_idx` ON series
(category, subcategory, name)"] at Bugzilla/DB.pm line 774
To avoid this problem, checksetup.pl should rename duplicated series names before adding the new index, e.g. by adding an underscore after them, i.e. Foo would become Foo_, Foo__, etc... (I don't expect too many duplicates of the same name). Each user can then rename their series to a better name, if they want to.
Flags: blocking4.2+
![]() |
Assignee | |
Comment 1•13 years ago
|
||
Actually, there are two ways to insert data into the series table: when manually creating new charts, and when creating a new product and its components.
chart.cgi has been implemented in Bugzilla 2.17.5 and has checks to prevent duplicated entries since Bugzilla 2.17.7, see bug 232749. So very few installations should be affected by this problem when creating new charts manually.
editproducts.cgi and editcomponents.cgi, or more exactly Bugzilla::Series->new() didn't check for duplicated entries before Bugzilla 3.0.6/3.2rc2, see bug 247936. So this can lead to duplicated entries when deleting and recreating the exact same product and components. This is probably how some installations got duplicated entries.
As this situation is expected to affect only few installations, it's not a hard blocker. I'm leaving the blocking4.2+ flag for now, but I will remove it if it's the last blocker.
![]() |
Assignee | |
Comment 2•13 years ago
|
||
(In reply to Frédéric Buclin from comment #1)
> editproducts.cgi and editcomponents.cgi, or more exactly
> Bugzilla::Series->new() didn't check for duplicated entries before Bugzilla
> 3.0.6/3.2rc2, see bug 247936. So this can lead to duplicated entries when
> deleting and recreating the exact same product and components.
*and* the one recreating the exact same product and components must be another admin than the original one, due to the index in the series DB which prevents the same admin to do this same action twice! This means that very few installations are affected by this problem and this is definitely not a blocker anymore.
Severity: normal → minor
Flags: blocking4.2+ → blocking4.2-
![]() |
Assignee | |
Comment 4•13 years ago
|
||
Slightly better message: name -> category/subcategory/name.
Attachment #590605 -
Attachment is obsolete: true
Attachment #590605 -
Flags: review?(dkl)
Attachment #590609 -
Flags: review?(dkl)
Comment 5•13 years ago
|
||
Comment on attachment 590609 [details] [diff] [review]
patch, v1.1
Review of attachment 590609 [details] [diff] [review]:
-----------------------------------------------------------------
Nice. Code looks correct to me and I ran it against my BMO copy which had a few duplicates and it updated them properly. r=dkl
Attachment #590609 -
Flags: review?(dkl) → review+
![]() |
Assignee | |
Updated•13 years ago
|
Flags: approval4.2+
Flags: approval+
![]() |
Assignee | |
Comment 6•13 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Install/DB.pm
Committed revision 8092.
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified Bugzilla/Install/DB.pm
Committed revision 8013.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•