Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005607TestLinkDatabase MS-SQLpublic2013-04-03 10:542013-05-22 20:58
Reporterrkumar83 
Assigned Tofman 
PriorityurgentSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.6 (2013 Q1 - bug fixing) 
Fixed in Version1.9.7 (2013 Q2 - bug fixing) 
Summary0005607: DB Access Error while deleting a test step in a testcase
DescriptionDB Access Error while deleting a test step in a testcase
Steps To ReproduceI upgraded testlink from 1.8.5 to 1.9.6.

Steps i followed:
1. Upgrade 1.8.5 to 1.9.2 (Auto upgrade by following the screen shots)
2. from 1.9.2 to 1.9.6, i ran all the sql queries for manual upgrade.

I see testlink opens fine, and i see all the projects and testcases in it. But when i delete a teststep i get DB Access Error on the UI.

Note: Test step is deleted but still i get that error on testlink UI
Additional InformationFrom Logs:

[<<][515c06c529f21902496469][DEFAULT][/lib/testcases/archiveData.php][13/Apr/3 10:39:01][13/Apr/3 10:39:01][took 0.150105 secs]
[<<][515c06c9cef09558398287][DEFAULT][/lib/testcases/tcEdit.php][13/Apr/3 10:39:05][13/Apr/3 10:39:05][took 0.065289 secs]
[>>][515c06c9df066416431581][DEFAULT][/lib/testcases/tcEdit.php][13/Apr/3 10:39:05]
    [13/Apr/3 10:39:05][ERROR][ec8e99f53340cc942d4abd5eb58c91ae][DATABASE]
        ERROR ON exec_query() - database.class.php
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND TCV.version = 1 ORDER BY TCV.version DESC' at line 11 - SELECT UA.login AS updater_login,UB.login AS author_login,
                         NHTC.name,NHTC.node_order,NHTC.parent_id AS testsuite_id,
                         NHTCV.parent_id AS testcase_id, TCV.*,
                         UB.first AS author_first_name,UB.last AS author_last_name,
                         UA.first AS updater_first_name,UA.last AS updater_last_name
                         FROM nodes_hierarchy NHTCV
                         JOIN nodes_hierarchy NHTC ON NHTCV.parent_id = NHTC.id
                         JOIN tcversions TCV ON NHTCV.id = TCV.id
                         LEFT OUTER JOIN users UB ON TCV.author_id = UB.id
                         LEFT OUTER JOIN users UA ON TCV.updater_id = UA.id
                          WHERE NHTCV.parent_id = AND TCV.version = 1 ORDER BY TCV.version DESC
THE MESSAGE : SELECT UA.login AS updater_login,UB.login AS author_login,
                         NHTC.name,NHTC.node_order,NHTC.parent_id AS testsuite_id,
                         NHTCV.parent_id AS testcase_id, TCV.*,
                         UB.first AS author_first_name,UB.last AS author_last_name,
                         UA.first AS updater_first_name,UA.last AS updater_last_name
                         FROM nodes_hierarchy NHTCV
                         JOIN nodes_hierarchy NHTC ON NHTCV.parent_id = NHTC.id
                         JOIN tcversions TCV ON NHTCV.id = TCV.id
                         LEFT OUTER JOIN users UB ON TCV.author_id = UB.id
                         LEFT OUTER JOIN users UA ON TCV.updater_id = UA.id
                          WHERE NHTCV.parent_id = AND TCV.version = 1 ORDER BY TCV.version DESC
Query failed: errorcode[1064]
    errormsg:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND TCV.version = 1 ORDER BY TCV.version DESC' at line 11
    [13/Apr/3 10:39:05][WARNING][ec8e99f53340cc942d4abd5eb58c91ae][GUI]
        E_NOTICE
Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' - in /data/servers/qatools/testlink/lib/functions/database.class.php - Line 212
    [13/Apr/3 10:39:05][WARNING][ec8e99f53340cc942d4abd5eb58c91ae][GUI]
        E_WARNING
Wrong parameter count for debug_print_backtrace() - in /data/servers/qatools/testlink/lib/functions/database.class.php - Line 212
    [13/Apr/3 10:39:05][ERROR][ec8e99f53340cc942d4abd5eb58c91ae][DATABASE]
        ERROR ON exec_query() - database.class.php
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 - /* Class:testcase - Method: get_last_version_info */ SELECT MAX(version) AS version FROM tcversions TCV JOIN nodes_hierarchy NH_TCV ON NH_TCV.id = TCV.id WHERE NH_TCV.parent_id =
THE MESSAGE : /* Class:testcase - Method: get_last_version_info */ SELECT MAX(version) AS version FROM tcversions TCV JOIN nodes_hierarchy NH_TCV ON NH_TCV.id = TCV.id WHERE NH_TCV.parent_id =
Query failed: errorcode[1064]
    errormsg:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    [13/Apr/3 10:39:05][WARNING][ec8e99f53340cc942d4abd5eb58c91ae][GUI]
TagsTO BE FIXED on 2.0
Database (MySQL,Postgres,etc)MySQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships
related to 0005631closedfman Manually upgraded from 1.9.5 to 1.9.6 - Deleting a test step throws DB Access Error 
child of 0005551closedfman Availables hot-fixes for 1.9.6 & How To get full fixed package from gitorious 

-  Notes
(0018618)
fman (administrator)
2013-04-03 15:37
edited on: 2013-04-03 15:38

Remember that issues without testlink version indication are considered garbage and candidate to be deleted ASAP.

Please recheck on FRESH 1.9.6 install, because your issue can be related to data issues on migration.

As you can see on this piece of sql
WHERE NHTCV.parent_id = AND TCV.version = 1 ORDER BY TCV.version DESC

parent_id EMPTY is the issue => seems to be a data migration issue

best thing to do is
migrate to 1.9.2 and check is issue is present.

(0018619)
rkumar83 (reporter)
2013-04-03 15:49

No, issue is not seen when i migrated from 1.8.5 to 1.9.2, i can see this issue only when i migrated from 1.9.2 to 1.9.6

So, how do i fix this issue now? there is a huge number of test projects and test cases in it.
(0018620)
rkumar83 (reporter)
2013-04-03 15:50

Is this because of some schema not upgraded in database?
(0018621)
fman (administrator)
2013-04-03 15:55

Best thing is continue step by step,
i.e. 1.9.2 to 1.9.3 => check
1.9.3 to 1.9.4 => check
and so on

in this way we will be able were the issue was created.
(0018622)
rkumar83 (reporter)
2013-04-03 16:00

ok, let me try that.. BTW, how do i put the testlink version in the bug? there is no option for me to edit the bug
(0018641)
rkumar83 (reporter)
2013-04-08 09:35

This issue is happening when i migrate from 1.9.5 to 1.9.6. Looks like testlink is looking for some columns/fields in database which is not available. Can someone please help me resolve this issue.
(0018642)
rkumar83 (reporter)
2013-04-08 09:36

[13/Apr/8 09:22:28][ERROR][<nosession>][DATABASE]
        ERROR ON exec_query() - database.class.php
1054 - Unknown column 'cookie_string' in 'field list' - SELECT id,login,password,cookie_string,first,last,email,role_id,locale, login AS fullname, active,default_testproject_id, script_key FROM users WHERE login = 'admin'
THE MESSAGE : SELECT id,login,password,cookie_string,first,last,email,role_id,locale, login AS fullname, active,default_testproject_id, script_key FROM users WHERE login = 'admin'
Query failed: errorcode[1054]
    errormsg:Unknown column 'cookie_string' in 'field list'
    [13/Apr/8 09:22:28][WARNING][<nosession>][GUI]
        E_NOTICE
Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' - in /data/servers/qatools/testlink/lib/functions/database.class.php - Line 212
    [13/Apr/8 09:22:28][WARNING][<nosession>][GUI]
        E_WARNING
Wrong parameter count for debug_print_backtrace() - in /data/servers/qatools/testlink/lib/functions/database.class.php - Line 212
    [13/Apr/8 09:22:28][WARNING][<nosession>][GUI]
        E_WARNING
include(/data/servers/qatools/testlink/gui/templates_c//%%6A^6A5^6A537DD8%%login.tpl.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory - in /data/servers/qatools/testlink/third_party/smarty/libs/Smarty.class.php - Line 1263
    [13/Apr/8 09:22:28][WARNING][<nosession>][GUI]
        E_WARNING
include() [<a href='function.include'>function.include</a>]: Failed opening '/data/servers/qatools/testlink/gui/templates_c//%%6A^6A5^6A537DD8%%login.tpl.php' for inclusion (include_path='.:/opt/lampp/lib/php:.:/data/servers/qatools/testlink/lib/functions/:/data/servers/qatools/testlink/lib/issuetrackerintegration/:/data/servers/qatools/testlink/third_party/') - in /data/servers/qatools/testlink/third_party/smarty/libs/Smarty.class.php - Line 1263
    [13/Apr/8 09:22:28][WARNING][<nosession>][GUI]
        E_WARNING
include(/data/servers/qatools/testlink/gui/templates_c//%%6A^6A5^6A537DD8%%login.tpl.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory - in /data/servers/qatools/testlink/third_party/smarty/libs/Smarty.class.php - Line 1263
    [13/Apr/8 09:22:28][WARNING][<nosession>][GUI]
        E_WARNING
include() [<a href='function.include'>function.include</a>]: Failed opening '/data/servers/qatools/testlink/gui/templates_c//%%6A^6A5^6A537DD8%%login.tpl.php' for inclusion (include_path='.:/opt/lampp/lib/php:.:/data/servers/qatools/testlink/lib/functions/:/data/servers/qatools/testlink/lib/issuetrackerintegration/:/data/servers/qatools/testlink/third_party/') - in /data/servers/qatools/testlink/third_party/smarty/libs/Smarty.class.php - Line 1263
[<<][51628c541d22f856131120][DEFAULT][/login.php][13/Apr/8 09:22:28][13/Apr/8 09:22:28][took 0.05907 secs]
[>>][51628cb032159294495210][DEFAULT][/login.php][13/Apr/8 09:24:00]
[<<][51628cb032159294495210][DEFAULT][/login.php][13/Apr/8 09:24:00][13/Apr/8 09:24:00][took 0.08346 secs]
[>>][51628cb046956245339621][DEFAULT][/login.php][13/Apr/8 09:24:00]
    [13/Apr/8 09:24:00][ERROR][<nosession>][DATABASE]
        ERROR ON exec_query() - database.class.php
1054 - Unknown column 'cookie_string' in 'field list' - SELECT id,login,password,cookie_string,first,last,email,role_id,locale, login AS fullname, active,default_testproject_id, script_key FROM users WHERE login = 'admin'
THE MESSAGE : SELECT id,login,password,cookie_string,first,last,email,role_id,locale, login AS fullname, active,default_testproject_id, script_key FROM users WHERE login = 'admin'
Query failed: errorcode[1054]
    errormsg:Unknown column 'cookie_string' in 'field list'
    [13/Apr/8 09:24:00][WARNING][<nosession>][GUI]
        E_NOTICE
Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' - in /data/servers/qatools/testlink/lib/functions/database.class.php - Line 212
    [13/Apr/8 09:24:00][WARNING][<nosession>][GUI]
        E_WARNING
Wrong parameter count for debug_print_backtrace() - in /data/servers/qatools/testlink/lib/functions/database.class.php - Line 212
[<<][51628cb046956245339621][DEFAULT][/login.php][13/Apr/8 09:24:00][13/Apr/8 09:24:00][took 0.077037 secs]
[>>][51628cdc17c86477728682][DEFAULT][/login.php][13/Apr/8 09:24:44]
[<<][51628cdc17c86477728682][DEFAULT][/login.php][13/Apr/8 09:24:44][13/A
(0018643)
rkumar83 (reporter)
2013-04-08 10:07

I tried new installation of 1.9.6, but, it didn't work for me. I was getting the below error once i login to testlink

 Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /data/servers/qatools/testlink/lib/functions/tlIssueTracker.class.php on line 554
(0018644)
fman (administrator)
2013-04-08 11:46

1054 - Unknown column 'cookie_string' in 'field list' - SE
your db is not ok.

>> Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /data/servers
>>/qatools/testlink/lib/functions/tlIssueTracker.class.php on line 554
already reported, you have to upgrade PHP to latest 5.3
(0018646)
rkumar83 (reporter)
2013-04-08 11:58

Thanks fman.

I see this error on a new installation, unexpected T_PAAMAYIM_NEKUDOTAYIM.

But, i dont see this error when i upgraded from 1.9.4 to 1.9.6. The only issue am facing is the delete step. It throws DB Access Error. See my original logs at the top in "Additional Information" section
(0018651)
rkumar83 (reporter)
2013-04-09 12:13
edited on: 2013-04-09 12:14

Can someone please send me the sql queries to migrate from 1.9.4 to 1.9.6 version?

I just want to cross check if the sql queries i ran are the same.

Its MySQL DB.

(0018730)
sergio.alonso (reporter)
2013-04-18 10:13

I get same error reported in field "Additional Information"

Information:
- Testcases with steps introduced in TL 1.9.3. All OK.
- TL migrated from 1.9.3 to 1.9.6.
- O.S. Debian 6.0.7
- PHP 5.3.3-7+squeeze14
- DB MySQL 5.1.66-0+squeeze1
- Browsers: Iceweasel 10.0.12, Firefox 20.0.1, Chromium/Chrome 26.0.1410.43

Debugging:
==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query(SELECT UA.login AS updater_login,UB.login AS author_login,
                         NHTC.name,NHTC.node_order,NHTC.parent_id AS testsuite_id,
                         NHTCV.parent_id AS testcase_id, TCV.*,
                         UB.first AS author_first_name,UB.last AS author_last_name,
                         UA.first AS updater_first_name,UA.last AS updater_last_name
                         FROM nodes_hierarchy NHTCV
                         JOIN nodes_hierarchy NHTC ON NHTCV.parent_id = NHTC.id
                         JOIN tcversions TCV ON NHTCV.id = TCV.id
                         LEFT OUTER JOIN users UB ON TCV.author_id = UB.id
                         LEFT OUTER JOIN users UA ON TCV.updater_id = UA.id
                          WHERE NHTCV.parent_id = AND TCV.version = 1 ORDER BY TCV.version DESC, -1) called at [/usr/local/testlink-1.9.6/lib/functions/database.class.php:745]
#1 database->get_recordset(SELECT UA.login AS updater_login,UB.login AS author_login,
                         NHTC.name,NHTC.node_order,NHTC.parent_id AS testsuite_id,
                         NHTCV.parent_id AS testcase_id, TCV.*,
                         UB.first AS author_first_name,UB.last AS author_last_name,
                         UA.first AS updater_first_name,UA.last AS updater_last_name
                         FROM nodes_hierarchy NHTCV
                         JOIN nodes_hierarchy NHTC ON NHTCV.parent_id = NHTC.id
                         JOIN tcversions TCV ON NHTCV.id = TCV.id
                         LEFT OUTER JOIN users UB ON TCV.author_id = UB.id
                         LEFT OUTER JOIN users UA ON TCV.updater_id = UA.id
                          WHERE NHTCV.parent_id = AND TCV.version = 1 ORDER BY TCV.version DESC) called at [/usr/local/testlink-1.9.6/lib/functions/testcase.class.php:1975]
0000002 testcase->get_by_id(, , , Array ([output] => full_without_steps)) called at [/usr/local/testlink-1.9.6/lib/testcases/testcaseCommands.class.php:106]
0000003 testcaseCommands->initTestCaseBasicInfo(stdClass Object ([assigned_keywords_list] => ,[container_id] => 0,[tcase_id] => 0,[tcversion_id] => 0,[name] => ,[summary] => ,[preconditions] => ,[steps] => ,[expected_results] => ,[new_container_id] => 0,[old_container_id] => 0,[has_been_executed] => 0,[exec_type] => 1,[importance] => 2,[doAction] => doDeleteStep,[move_copy_tc] => 0,[delete_tc_version] => 0,[do_move] => 0,[do_copy] => 0,[do_create_new_version] => 0,[do_delete_tc_version] => 0,[do_activate_this] => 0,[do_deactivate_this] => 0,[target_position] => bottom,[copy] => Array ([keyword_assignments] => ,[requirement_assignments] => ),[show_mode] => ,[step_number] => 0,[step_id] => 5432,[step_set] => ,[tcaseSteps] => ,[testproject_id] => 132,[user_id] => 2,[refreshTree] => 1,[opt_requirements] => 1,[basehref] => http://koyak:8888/testlink/,[goback_url] [^] => ,[stay_here] => 0), stdClass Object ([action] => ,[attachments] => ,[cleanUpWebEditor] => ,[containerID] => ,[direct_link] => ,[execution_types] => Array ([1] => Manual,[2] => Automatizado),[grants] => stdClass Object ([requirement_mgmt] => ),[has_been_executed] => ,[initWebEditorFromTemplate] => ,[main_descr] => ,[name] => ,[refreshTree] => 0,[sqlResult] => ,[step_id] => -1,[step_set] => ,[steps] => ,[tableColspan] => 5,[tcase_id] => 0,[goback_url] => ,[show_mode] => show,[loadOnCancelURL] => archiveData.php?edit=testcase&show_mode=show&id=%s&version_id=%s,[template] => archiveData.php?version_id=1878&edit=testcase&id=1877&show_mode=show,[user_feedback] => )) called at [/usr/local/testlink-1.9.6/lib/testcases/testcaseCommands.class.php:687]
0000004 testcaseCommands->doDeleteStep(stdClass Object ([assigned_keywords_list] => ,[container_id] => 0,[tcase_id] => 0,[tcversion_id] => 0,[name] => ,[summary] => ,[preconditions] => ,[steps] => ,[expected_results] => ,[new_container_id] => 0,[old_container_id] => 0,[has_been_executed] => 0,[exec_type] => 1,[importance] => 2,[doAction] => doDeleteStep,[move_copy_tc] => 0,[delete_tc_version] => 0,[do_move] => 0,[do_copy] => 0,[do_create_new_version] => 0,[do_delete_tc_version] => 0,[do_activate_this] => 0,[do_deactivate_this] => 0,[target_position] => bottom,[copy] => Array ([keyword_assignments] => ,[requirement_assignments] => ),[show_mode] => ,[step_number] => 0,[step_id] => 5432,[step_set] => ,[tcaseSteps] => ,[testproject_id] => 132,[user_id] => 2,[refreshTree] => 1,[opt_requirements] => 1,[basehref] => http://koyak:8888/testlink/,[goback_url] [^] => ,[stay_here] => 0), Array ([show_mode] => ,[doAction] => doDeleteStep,[step_id] => 5432,[wikidb_session] => 0a08ccab8484b4f8727a921890e188be,[PHPSESSID] => fccc6a90b0e9548f0164c6fcc4aedce3,[TESTLINK_USER_AUTH_COOKIE] => 0b902ff98c59a90f8025739e0fa42607e1b34476d7a6211dda32f8a113bfb8de,[TL_lastTestPlanForUserID_1] => 5316,[ys-edit_tc_tproject_id_132_ext-comp-1001] => a:s%3A/132/1046/1876,[TCEditPopupWidth] => 1149,[TCEditPopupHeight] => 672)) called at [/usr/local/testlink-1.9.6/lib/testcases/tcEdit.php:115]
 ==============================================================================
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query(/* Class:testcase - Method: get_last_version_info */ SELECT MAX(version) AS version FROM tcversions TCV JOIN nodes_hierarchy NH_TCV ON NH_TCV.id = TCV.id WHERE NH_TCV.parent_id = ) called at [/usr/local/testlink-1.9.6/lib/functions/database.class.php:550]
#1 database->fetchFirstRow(/* Class:testcase - Method: get_last_version_info */ SELECT MAX(version) AS version FROM tcversions TCV JOIN nodes_hierarchy NH_TCV ON NH_TCV.id = TCV.id WHERE NH_TCV.parent_id = ) called at [/usr/local/testlink-1.9.6/lib/functions/database.class.php:532]
0000002 database->fetchFirstRowSingleColumn(/* Class:testcase - Method: get_last_version_info */ SELECT MAX(version) AS version FROM tcversions TCV JOIN nodes_hierarchy NH_TCV ON NH_TCV.id = TCV.id WHERE NH_TCV.parent_id = , version) called at [/usr/local/testlink-1.9.6/lib/functions/testcase.class.php:1608]
0000003 testcase->get_last_version_info(, Array ([output] => minimun)) called at [/usr/local/testlink-1.9.6/lib/functions/testcase.class.php:4437]
0000004 testcase->getExternalID(, 132) called at [/usr/local/testlink-1.9.6/lib/testcases/testcaseCommands.class.php:109]
0000005 testcaseCommands->initTestCaseBasicInfo(stdClass Object ([assigned_keywords_list] => ,[container_id] => 0,[tcase_id] => 0,[tcversion_id] => 0,[name] => ,[summary] => ,[preconditions] => ,[steps] => ,[expected_results] => ,[new_container_id] => 0,[old_container_id] => 0,[has_been_executed] => 0,[exec_type] => 1,[importance] => 2,[doAction] => doDeleteStep,[move_copy_tc] => 0,[delete_tc_version] => 0,[do_move] => 0,[do_copy] => 0,[do_create_new_version] => 0,[do_delete_tc_version] => 0,[do_activate_this] => 0,[do_deactivate_this] => 0,[target_position] => bottom,[copy] => Array ([keyword_assignments] => ,[requirement_assignments] => ),[show_mode] => ,[step_number] => 0,[step_id] => 5432,[step_set] => ,[tcaseSteps] => ,[testproject_id] => 132,[user_id] => 2,[refreshTree] => 1,[opt_requirements] => 1,[basehref] => http://koyak:8888/testlink/,[goback_url] [^] => ,[stay_here] => 0), stdClass Object ([action] => ,[attachments] => ,[cleanUpWebEditor] => ,[containerID] => ,[direct_link] => ,[execution_types] => Array ([1] => Manual,[2] => Automatizado),[grants] => stdClass Object ([requirement_mgmt] => ),[has_been_executed] => ,[initWebEditorFromTemplate] => ,[main_descr] => ,[name] => ,[refreshTree] => 0,[sqlResult] => ,[step_id] => -1,[step_set] => ,[steps] => ,[tableColspan] => 5,[tcase_id] => 0,[goback_url] => ,[show_mode] => show,[loadOnCancelURL] => archiveData.php?edit=testcase&show_mode=show&id=%s&version_id=%s,[template] => archiveData.php?version_id=1878&edit=testcase&id=1877&show_mode=show,[user_feedback] => )) called at [/usr/local/testlink-1.9.6/lib/testcases/testcaseCommands.class.php:687]
0000006 testcaseCommands->doDeleteStep(stdClass Object ([assigned_keywords_list] => ,[container_id] => 0,[tcase_id] => 0,[tcversion_id] => 0,[name] => ,[summary] => ,[preconditions] => ,[steps] => ,[expected_results] => ,[new_container_id] => 0,[old_container_id] => 0,[has_been_executed] => 0,[exec_type] => 1,[importance] => 2,[doAction] => doDeleteStep,[move_copy_tc] => 0,[delete_tc_version] => 0,[do_move] => 0,[do_copy] => 0,[do_create_new_version] => 0,[do_delete_tc_version] => 0,[do_activate_this] => 0,[do_deactivate_this] => 0,[target_position] => bottom,[copy] => Array ([keyword_assignments] => ,[requirement_assignments] => ),[show_mode] => ,[step_number] => 0,[step_id] => 5432,[step_set] => ,[tcaseSteps] => ,[testproject_id] => 132,[user_id] => 2,[refreshTree] => 1,[opt_requirements] => 1,[basehref] => http://koyak:8888/testlink/,[goback_url] [^] => ,[stay_here] => 0), Array ([show_mode] => ,[doAction] => doDeleteStep,[step_id] => 5432,[wikidb_session] => 0a08ccab8484b4f8727a921890e188be,[PHPSESSID] => fccc6a90b0e9548f0164c6fcc4aedce3,[TESTLINK_USER_AUTH_COOKIE] => 0b902ff98c59a90f8025739e0fa42607e1b34476d7a6211dda32f8a113bfb8de,[TL_lastTestPlanForUserID_1] => 5316,[ys-edit_tc_tproject_id_132_ext-comp-1001] => a:s%3A/132/1046/1876,[TCEditPopupWidth] => 1149,[TCEditPopupHeight] => 672)) called at [/usr/local/testlink-1.9.6/lib/testcases/tcEdit.php:115]
 ==============================================================================


Step is deleted -> OK. But when the GUI is refreshed db access error is thrown.

Studing the code, I found:
- In lib/testcases/tcEdit.php, line 114 (aprox):$op = $commandMgr->$pfn($args,$_REQUEST);
     The value of $args->tcase_id is 0

Then in lib/testcases/testcasesCommands.class.php, function initTestCaseBasicInfo(&$argsObj,&$guiObj)
     The value of $greenCard['tcase_id'] is 0

Then in lib/functions/testcase.class.php, function getIdCardByStepID($step_id)
     returns null

Then in in lib/functions/testcase.class.php, function get_by_id($id,$version_id = self::ALL_VERSIONS, $filters = null, $options=null)
     The value of $where_clause is "WHERE NHTCV.parent_id = AND TCV.version = 1"

And then error on exec_query() - database.class.php

Hope it helps.
Thanks.
(0018738)
fman (administrator)
2013-04-19 18:14

Issue is NOT RELATED to database scripts (if you give a look to the scripts can find that no action on test cases related tables is done).
Issue is related to code on method doDeleteStep() on testcaseCommands.class.php
(0018739)
fman (administrator)
2013-04-19 18:18

http://gitorious.org/testlink-ga/testlink-code/commit/04213add08d23ec415c6f57beb5428392f9a00cf [^]
(0018745)
sergio.alonso (reporter)
2013-04-22 06:15

Patch applyied.

It works. :)

Thanks a lot!

- Issue History
Date Modified Username Field Change
2013-04-03 10:54 rkumar83 New Issue
2013-04-03 15:37 fman Note Added: 0018618
2013-04-03 15:38 fman Note Edited: 0018618 View Revisions
2013-04-03 15:49 rkumar83 Note Added: 0018619
2013-04-03 15:50 rkumar83 Note Added: 0018620
2013-04-03 15:55 fman Note Added: 0018621
2013-04-03 16:00 rkumar83 Note Added: 0018622
2013-04-08 09:35 rkumar83 Note Added: 0018641
2013-04-08 09:36 rkumar83 Note Added: 0018642
2013-04-08 10:07 rkumar83 Note Added: 0018643
2013-04-08 11:46 fman Note Added: 0018644
2013-04-08 11:58 rkumar83 Note Added: 0018646
2013-04-09 12:13 rkumar83 Note Added: 0018651
2013-04-09 12:14 rkumar83 Note Edited: 0018651 View Revisions
2013-04-12 17:01 fman Relationship added related to 0005631
2013-04-18 10:13 sergio.alonso Note Added: 0018730
2013-04-19 18:14 fman Note Added: 0018738
2013-04-19 18:18 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2013-04-19 18:18 fman Note Added: 0018739
2013-04-19 18:18 fman Status new => resolved
2013-04-19 18:18 fman Fixed in Version => 1.9.7 (2013 Q2 - bug fixing)
2013-04-19 18:18 fman Resolution open => fixed
2013-04-19 18:18 fman Assigned To => fman
2013-04-19 18:19 fman Relationship added child of 0005551
2013-04-19 18:19 fman Tag Attached: TO BE FIXED on 2.0
2013-04-19 18:20 fman Product Version => 1.9.6 (2013 Q1 - bug fixing)
2013-04-22 06:15 sergio.alonso Note Added: 0018745
2013-05-22 20:58 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker