The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in Bugzilla 2.22

Status

()

Bugzilla
Database
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: Brett, Assigned: Frédéric Buclin)

Tracking

2.20
Bugzilla 2.22
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.56 KB, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Reporter)

Description

12 years ago
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.

Comment 1

12 years ago
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

Updated

12 years ago
Assignee: administration → mkanat
(Assignee)

Updated

12 years ago
Blocks: 314490
(Assignee)

Comment 2

12 years ago
confirming on 2.21.1+! The error only appears when 'makeproductgroups' is turned on.
(Assignee)

Comment 3

12 years ago
Created attachment 201861 [details] [diff] [review]
patch, v1

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)
(Assignee)

Updated

12 years ago
Severity: major → normal
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22

Comment 4

12 years ago
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-

Updated

12 years ago
Summary: [PostgreSQL] Add product (partly) failed with 'null value in not null attribute userregexp' → [PostgreSQL] Add product partly fails when 'makeproductgroups' is enabled
(Assignee)

Comment 5

12 years ago
Created attachment 201878 [details] [diff] [review]
patch, v2
Attachment #201861 - Attachment is obsolete: true
Attachment #201878 - Flags: review?(mkanat)

Comment 6

12 years ago
Comment on attachment 201878 [details] [diff] [review]
patch, v2

Yep, looks good to me, works as intended.
Attachment #201878 - Flags: review?(mkanat) → review+
(Assignee)

Updated

12 years ago
Flags: approval?
Flags: approval? → approval+
(Assignee)

Comment 7

12 years ago
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
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 8

11 years ago
*** 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.