Problem with project upgrade and workflow customization

Hello, i am currently upgrading a platform from QC10 to QC11.52.


I could upgrade the project, but i have an error (joined to this message) when i want to see the steps of a test run.


I wen to the script editor and looked for the incriminated workflow (Copied at the end of this message). I found on the support platform QCCR about a function used :


I asked around in the company but nobody remember what was the purpose of this modification, i understood vaguely that it was some sort of code to filter the tests steps in reference to cycle they're in. However, i don't really see the point a test step is related to a test run, which is himself related to the cycle.


A project that did not have any cycle did not show any error if we go to the test steps.


I tried removing the workflow and it worked (whithout any visible drawback at the moment). However, since i don't know what was the purpose of this script, i don't really want to just delete it.


Does any of you understand the meaning of this script ? Know how to fix it in 11.52 ? Can tell me if the removal of such script could impact other areas of my project ?


Thank you in advance for any response,

Best regards,

Cédric Mabileau


Script :


Sub Step_MoveTo
'  On Error Resume Next
   Dim runFactory, run, runFilter, runList, highest
   Set runFactory = TDConnection.RunFactory
   Set run = runFactory.Item( Step_Fields.Field("ST_RUN_ID").Value )
   'if run.Status = "Passed" or run.Status = "Failed" then
   '     For i = 1 To Step_Fields.Count
   '      Step_Fields.FieldById(i).IsReadOnly=True
   '     Next
      Set runFilter = runFactory.Filter
      runFilter.Filter("RN_TESTCYCL_ID") = run.Field("RN_TESTCYCL_ID")
      Set runList = runFactory.NewList(runFilter.Text)
      highest = 0
       for each cRun in runList
           if cRun.ID > highest then
              highest = cRun.ID
           end if
       if run.ID <> highest then
              For i = 1 To Step_Fields.Count
       end if
   'end if
'  On Error GoTo 0
  • Hi Mabileauc,


    Regarding your query, after searching, the workflow code is a filter for the selected test instance id returns all runs in the run table.

    This code seems like work in QC 10 but it is failed with ALM. It is treated as a defect which you mention above (QCCR1J62997). Currently, the status of it is under investigation and we can not provide any ETA for this as it will be approved by R&D team.


    Thank you and regards,

  • Hello Cédric,


    The purpose of this script is most likely to check which of the steps for the run are associated with another cycle - if so, it makes the Step fields read only. This would happen if the Test Set was assigned to one cycle, test run was started (not completed), then the test set was reassigned to another cycle and the run is completed. It would also work for a run which was done while the test set was assigned to a different cycle. You can get the script running without the error message if you uncomment the "on error" statements in the beginning and the end of the sub.


    The filter is still not working due to the defect that you have found - the script would go through all the steps in the current run that you are trying to edit.


    I hope this helps.

    Kind regards,


  • Verified Answer

    Hello, thank you for your responses,

    I found the solution to my problem:


    What my script was doing was to prevent the modification of the status for the test runs unless it is the last one.

    What i did is rewrite the code without the rn_testcycl_id object.