Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008283TestLinkRequirement Managementpublic2018-06-05 12:232018-10-06 12:17
ReporterabIng 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.17 (2018 Q1) 
Fixed in Version1.9.18 (2018 Q3) 
Summary0008283: Errors in log when filtering generates an empty requirement spec
DescriptionIf a requirement folder does not contain any requirement that correspond to a filter there is error message in the log (treeMenu.inc.php - Line 2013)

The code expects that the variable $child is an array with the element 'id' but it is a string with value 'd8ba8cfb-ca92-4fa5-83c2-551977d405fb'.
Steps To Reproduce - Create a project AB2, prefix 002, Requirements enabled
 - Create Requirement Specifications DIR1 and DIR2, see image attached
 - Inside DIR1 create requirements REQ1 (Draft) and REQ2 (Finished)
 - Inside DIR2 create requirement REQ3 (Draft)
 - Filter on Status = Draft - two requirements found (REQ1 and REQ3); log file does not contain errors
 - Filter on Status = Finished - one requirements found (REQ2); log file contains error message (see log file attached):

[18/Jun/5 11:59:53][WARNING][a4d77hlaedcrsbr79h34742sk5][GUI - Test Project ID : 7]
    E_WARNING
Illegal string offset 'id' - in C:\wamp64\www\testlink-1.9.17\lib\functions\treeMenu.inc.php - Line 2013


The code around line 2013 is:
      foreach($node['childNodes'] as $child) {
        if (!is_null($child)) {
          $child_id = $child['id'];
          if (isset($filtered_map[$child_id])) {
            $doc_id = htmlspecialchars($filtered_map[$child_id]['req_spec_doc_id']);
          }
          break; // only need to get one child for this
        }
      }

Additional InformationDeeper study shows that $child is not an array but rather a string with value d8ba8cfb-ca92-4fa5-83c2-551977d405fb
Note that this value is defined as REMOVEME in const.inc.php
TagsNo tags attached.
Database (MySQL,Postgres,etc)any (tested with MS SQL and MySQL)
Browserany
PHP Versionany
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files7z file icon logpng.7z [^] (61,663 bytes) 2018-06-05 12:23

- Relationships
related to 0007823new Testsuite d8ba8cfb-ca92-4fa5-83c2-551977d405fb (REMOVEME) while filtering 

-  Notes
(0027540)
abIng (reporter)
2018-06-05 15:18

Please note the difference regarding the issue 7823:
- 7823 is related to tests specification ant 8283 is related to requirements
- in 7823 the error is visible in GUI, and in 8283 it is visible only in log file

In both cases the value d8ba8cfb-ca92-4fa5-83c2-551977d405fb is the same
(0027598)
fman (administrator)
2018-06-16 18:12

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/072ad39f4daa308a760ff27bb9d48bac825f12e2 [^]
(0027943)
fman (administrator)
2018-10-06 12:17

1.9.18 released

- Issue History
Date Modified Username Field Change
2018-06-05 12:23 abIng New Issue
2018-06-05 12:23 abIng File Added: logpng.7z
2018-06-05 15:01 fman Relationship added related to 0007823
2018-06-05 15:18 abIng Note Added: 0027540
2018-06-16 18:10 fman QA Team - Task Workflow Status => TBD
2018-06-16 18:10 fman Category Filters => Requirement Management
2018-06-16 18:10 fman Summary Errors in log while filtering empty requirements folder => Errors in log when filtering generates and empty requirement spec
2018-06-16 18:11 fman Summary Errors in log when filtering generates and empty requirement spec => Errors in log when filtering generates an empty requirement spec
2018-06-16 18:11 fman Assigned To => fman
2018-06-16 18:11 fman Status new => assigned
2018-06-16 18:11 fman Fixed in Version => 1.9.18 (2018 Q3)
2018-06-16 18:12 fman Note Added: 0027598
2018-06-16 18:12 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2018-06-16 18:12 fman Status assigned => resolved
2018-06-16 18:12 fman Resolution open => fixed
2018-10-06 12:17 fman Note Added: 0027943
2018-10-06 12:17 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker