Closed Bug 305927 Opened 20 years ago Closed 19 years ago

[PostgreSQL] Add product partly fails when 'makeproductgroups' is enabled

Categories

(Bugzilla :: Database, defect)

2.20
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.22

People

(Reporter: skip.slugger, Assigned: LpSolit)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 When trying to add a product in Bugzilla, an error message comes up with the following error: Software error: DBD::Pg::st execute failed: ERROR: ExecInsert: Fail to add null value in not null attribute userregexp [for Statement "INSERT INTO groups (name, description, isbuggroup, last_changed) VALUES ('Mongoose', 'Access to bugs in the Mongoose product', 1, NOW())"] at Bugzilla/DB.pm line 84 Bugzilla::DB::SendSQL('INSERT INTO groups (name, description, isbuggroup, last_chang...') called at /var/www/html/bugzilla/editproducts.cgi line 550 When viewing the products page, the new product is there, but the group is not. I have configured Bugzilla to add a group for each new product, option 'makeproductgroups'. Reproducible: Always Steps to Reproduce: 1. Install Bugzilla 2. Configure Bugzilla to create groups for new products. Login, go to the preferences page, turn 'makeproductgroups' on. 3. Use the links at the bottom of the page to go to the Products page and Add a new product. 4. When you click 'Add' the error occurs Actual Results: Software error: DBD::Pg::st execute failed: ERROR: ExecInsert: Fail to add null value in not null attribute userregexp [for Statement "INSERT INTO groups (name, description, isbuggroup, last_changed) VALUES ('Mongoose', 'Access to bugs in the Mongoose product', 1, NOW())"] at Bugzilla/DB.pm line 84 Bugzilla::DB::SendSQL('INSERT INTO groups (name, description, isbuggroup, last_chang...') called at /var/www/html/bugzilla/editproducts.cgi line 550 Expected Results: Not presented and error. If I change the configuration option 'makeproductgroups' to off, then the error does not occur.
I imagine you're using 2.20rc2?
Status: UNCONFIRMED → NEW
Component: Administration → Database
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: Add product (partly) failed with 'null value in not null attribute userregexp' → [PostgreSQL] Add product (partly) failed with 'null value in not null attribute userregexp'
Target Milestone: --- → Bugzilla 2.20
Version: unspecified → 2.20
Assignee: administration → mkanat
Blocks: meta-pg
confirming on 2.21.1+! The error only appears when 'makeproductgroups' is turned on.
Attached patch patch, v1 (obsolete) — Splinter Review
userregexp has no default value and is not null, so it must be explicitly given. MySQL falls back to an empty string by default, but Pg doesn't.
Assignee: mkanat → LpSolit
Status: NEW → ASSIGNED
Attachment #201861 - Flags: review?(mkanat)
Severity: major → normal
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Comment on attachment 201861 [details] [diff] [review] patch, v1 Let's just give it a DEFAULT in the DB. I think a default makes sense for this field.
Attachment #201861 - Flags: review?(mkanat) → review-
Summary: [PostgreSQL] Add product (partly) failed with 'null value in not null attribute userregexp' → [PostgreSQL] Add product partly fails when 'makeproductgroups' is enabled
Attached patch patch, v2Splinter Review
Attachment #201861 - Attachment is obsolete: true
Attachment #201878 - Flags: review?(mkanat)
Comment on attachment 201878 [details] [diff] [review] patch, v2 Yep, looks good to me, works as intended.
Attachment #201878 - Flags: review?(mkanat) → review+
Flags: approval?
Flags: approval? → approval+
Checking in checksetup.pl; /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl new revision: 1.448; previous revision: 1.447 done Checking in Bugzilla/DB/Schema.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v <-- Schema.pm new revision: 1.42; previous revision: 1.41 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 329214 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: