Closed Bug 358590 Opened 19 years ago Closed 19 years ago

postgreSQL: Cannot make new test plan

Categories

(Testopia :: Test Plans, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jonaliz55, Assigned: LpSolit)

References

Details

(Whiteboard: [blocker will fix])

User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.3705; Googlebot; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 1.0.3705; Googlebot) Build Identifier: Software error: DBD::Pg::db do failed: ERROR: syntax error at or near "." at character 152 [for Statement "INSERT INTO test_plans (test_plans.plan_id, test_plans.product_id, test_plans.author_id, test_plans.type_id, test_plans.default_product_version, test_plans.name, test_plans.creation_date, test_plans.isactive) VALUES (?,?,?,?,?,?,?,?)"] at Bugzilla/Testopia/TestPlan.pm line 158 Bugzilla::Testopia::TestPlan::store('Bugzilla::Testopia::TestPlan=HASH(0x9601ce8)') called at /var/www/html/bugzilla/tr_new_plan.cgi line 80 Reproducible: Always Steps to Reproduce: 1.Create new test plan with it a name 2.Enter some data for test plan 3.Select "Add" Actual Results: As in Details section Using postgreSQL and ver 1.1 of Testopia.
Any updates on this?!
Max, can you see anything wrong with this insert statement that might cause an error like this?
Yeah, you need to remove the table names from the columns. They don't need to be there--you obviously can insert into only one table. :-)
Summary: Cannot make new test plan → postgreSQL: Cannot make new test plan
Version: unspecified → 1.1
I hope this is helpful. I followed what Max suggested and in Bugzilla/Testopia/TestPlan.pm changed: use constant DB_COLUMNS => qw( test_plans.plan_id test_plans.product_id test_plans.author_id test_plans.type_id test_plans.default_product_version test_plans.name test_plans.creation_date test_plans.isactive ); to use constant DB_COLUMNS => qw( plan_id product_id author_id type_id default_product_version name creation_date isactive ); and I got the following error: DBD::Pg::db do failed: ERROR: null value in column "plan_id" violates not-null constraint [for Statement "INSERT INTO test_plans (plan_id, product_id, author_id, type_id, default_product_version, name, creation_date, isactive) VALUES (?,?,?,?,?,?,?,?)"] at Bugzilla/Testopia/TestPlan.pm line 176 Bugzilla::Testopia::TestPlan::store('Bugzilla::Testopia::TestPlan=HASH(0x8fb8460)') called at /var/www/bugzilla/tr_new_plan.cgi line 82 Furher I changed again DB_COLUMNS constant again and removed "plan_id" from it. After that I changed: $dbh->do("INSERT INTO test_plans ($columns) VALUES (?,?,?,?,?,?,?,?)", undef, (undef, $self->{'product_id'}, $self->{'author_id'}, $self->{'type_id'}, $self->{'default_product_version'}, $self->{'name'}, $timestamp, 1)); to look like this: $dbh->do("INSERT INTO test_plans ($columns) VALUES (?,?,?,?,?,?,?)", undef, ($self->{'product_id'}, $self->{'author_id'}, $self->{'type_id'}, $self->{'default_product_version'}, $self->{'name'}, $timestamp, 1)); and I was able at least to create a new Test Plan. I am not sure though if these changes will affect further the bugzilla functionality as a whole.
Assignee: ghendricks → nobody
This will be fixed by bug 379529.
Assignee: nobody → LpSolit
Depends on: 379529
Whiteboard: [blocker will fix]
Target Milestone: --- → 1.3
The blocker has been checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.