Closed
Bug 522404
Opened 16 years ago
Closed 16 years ago
Cannot create components for multiple products in a row in one script
Categories
(Bugzilla :: Administration, task, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
(Whiteboard: [es-lambda])
Attachments
(1 file, 1 obsolete file)
1.71 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
When creating or updating a product, all cached data about products in the current Bugzilla->user object should be removed. (Otherwise, you can't really create components for two products in a row in the same script, because selectable_products doesn't know that the second product exists, and you get an error.)
Attachment #406372 -
Flags: review?(dkl)
Assignee | ||
Updated•16 years ago
|
Whiteboard: [es-lambda]
Assignee | ||
Comment 1•16 years ago
|
||
This is more of a bug, and actually, the above patch doesn't seem to fix it yet. I'll investigate.
Severity: enhancement → minor
Status: NEW → ASSIGNED
Summary: Product->update and Product->create should clear $user->selectable_products, etc. → Cannot create components for multiple products in a row in one script
Assignee | ||
Updated•16 years ago
|
Assignee: administration → mkanat
Assignee | ||
Comment 2•16 years ago
|
||
Okay, the problem was that anything could have called get_selectable_products in between the first time we created a product and the second time we're trying to create a product. In my case, it was Bugzilla::Component->create calling it. There's no way to know what's going to call it. The only truly reliable thing to do is to clear the cache immediately after inserting a product into the database, which I do here, and which works.
Attachment #406372 -
Attachment is obsolete: true
Attachment #406376 -
Flags: review?(dkl)
Attachment #406372 -
Flags: review?(dkl)
Assignee | ||
Updated•16 years ago
|
Priority: -- → P1
Comment 3•16 years ago
|
||
Comment on attachment 406376 [details] [diff] [review]
v2
I have tested this patch and all works as described when creating new product and new component using a test script I wrote. Also normal activities work using the product admin UI. r=dkl
Attachment #406376 -
Flags: review?(dkl) → review+
Updated•16 years ago
|
Flags: approval?
Assignee | ||
Comment 5•16 years ago
|
||
Checking in Bugzilla/Product.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Product.pm,v <-- Product.pm
new revision: 1.40; previous revision: 1.39
done
Checking in Bugzilla/User.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm
new revision: 1.193; previous revision: 1.192
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•