Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26656

Undefined index: testprojectid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • testlink-plugin
    • Jenkins 1.567
      TestLink 1.9.10
      Plugin 3.10

      During the execution the following error message appears in the log file of testlink:

      Undefined index: testprojectid - in /var/www/html/testlink/lib/api/xmlrpc/v1/xmlrpc.class.php - Line 386

      It happens during the treatment of fourth XML RPC call tl.createBuild:
      <?xml version="1.0" encoding="UTF-8"?>
      <methodCall xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions">
      <methodName>tl.createBuild</methodName>
      <params>
      <param>
      <value>
      <struct>
      <member>
      <name>buildnotes</name>
      <value>Build created automatically with TestLink Jenkins Plug-in.</value>
      </member>
      <member>
      <name>testplanid</name>
      <value>
      <i4>1426</i4>
      </value>
      </member>
      <member>
      <name>buildname</name>
      <value>TBJ-57</value>
      </member>
      <member>
      <name>devKey</name>
      <value>45074252481165a36d24ea0598052d5f</value>
      </member>
      </struct>
      </value>
      </param>
      </params>
      </methodCall>

      The problem is that in the PHP function userHasRight of TestLink the ID of the project is required but it is not supplied by the XML RPC request (that contains test plan ID but does not contain test project ID).
      Due to another minor bug in TestLink it is accepted, the processing is not aborted; only the error message is logged.

      Strictly speaking, the database of TestLInk is organized in such a way that creating the build does not require test project ID. It is required in the secondary function userHasRight.

      However, to avoid having errors in log file it would be better to provide the testprojectid in the request.

      Going further, there are plenty of error messages of this type, for example the next request tl.getTestCasesForTestPlan generates three more error messages in the log file:

      • Undefined index: testprojectid
      • Undefined index: keywords
      • Undefined index: keywords

      The next call tl.getTestCaseCustomFieldDesignValue generates

      • Undefined index: testcaseexternalid

      etc.
      I did not study the reasons of other error messages, but it seems that the reason is the same - missing information in the XML RPC request.

            kinow Bruno P. Kinoshita
            ab_ing A B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: