Closed Bug 472136 Opened 17 years ago Closed 17 years ago

cannot make a testrun - constraint fk_test_case_runs_assignee_profiles_userid

Categories

(Testopia :: Test Runs, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: buchner.johannes, Assigned: gregaryh)

References

Details

Hi! I'm trying to setup some testcases and testruns. - I setup a testplan - I setup a test case Now I'm trying to do a test run and add the testcase to it. - So I Select New Run - Select the test plan - select the test case in existing cases - fill out the required fields below - click submit Results: A popup saying "500 Internal Server Error ..." This also happens when I try to do it some other way (in editing the test runs). Interestingly, the test run is created, but I'm never able to add a test case with results to it. The apache error log shows this: [Mon Jan 05 12:13:46 2009] [error] DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`bugzilla/test_case_runs`, CONSTRAINT `fk_test_case_runs_assignee_profiles_userid` FOREIGN KEY (`assignee`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE) [for Statement "INSERT INTO test_case_runs (build_id, environment_id, case_text_version, assignee, sortkey, case_id, iscurrent, case_run_status_id, run_id) VALUES (?,?,?,?,?,?,?,?,?)"] at /var/www/html/bugs/Bugzilla/Object.pm line 352\n\tBugzilla::Object::insert_create_data('Bugzilla::Testopia::TestCaseRun', 'HASH(0xbb8b87f8)') called at /var/www/html/bugs/Bugzilla/Testopia/TestCaseRun.pm line 227\n\tBugzilla::Testopia::TestCaseRun::create('Bugzilla::Testopia::TestCaseRun', 'HASH(0xbb8b8858)') called at /var/www/html/bugs/Bugzilla/Testopia/TestRun.pm line 394\n\tBugzilla::Testopia::TestRun::add_case_run('Bugzilla::Testopia::TestRun=HASH(0xbb8c1134)', 3, 'undef') called at /var/www/html/bugs/Bugzilla/Testopia/TestCase.pm line 533\n\tBugzilla::Testopia::TestCase::create('Bugzilla::Testopia::TestCase', 'HASH(0xbb8b8618)') called at /var/www/html/bugs/tr_new_case.cgi line 102\n\tModPerl::ROOT::ModPerl::Registry::var_www_html_bugs_tr_new_case_2ecgi::handler('Apache2::RequestRec=SCALAR(0xbb81c284)') called at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/RegistryCooker.pm line 204\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/RegistryCooker.pm line 204\n\tModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0xbb4ac234)') called at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/RegistryCooker.pm line 170\n\tModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0xbb4ac234)') called at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/Registry.pm line 31\n\tModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0xbb81c284)') called at -e line 0\n\teval {...} called at -e line 0\n What am I doing wrong? Can I provide any more information?
Looking at this error output it appears as though you were trying to add a new case to a run as you create the test case (using the add to run box on the new case form). When I do that I get the same error message, however, when I try doing your steps above, namely create a new run, select existing cases, and submit, the run is created successfully. Can you verify that?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Does it work when you set a default tester on the test case?
You will need to run the following to remove the specified foreign keys from the test_case_runs table: ALTER TABLE test_case_runs DROP FOREIGN KEY `fk_test_case_runs_testedby_profiles_userid`; ALTER TABLE test_case_runs DROP FOREIGN KEY `fk_test_case_runs_assignee_profiles_userid`; Checking in extensions/testopia/code/db_schema-abstract_schema.pl; /cvsroot/mozilla/webtools/testopia/extensions/testopia/code/db_schema-abstract_schema.pl,v <-- db_schema-abstract_schema.pl new revision: 1.8; previous revision: 1.7
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.