Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

Re: Update TC_USER_** when RUN_USER will changed

$
0
0
Hellow Dears I finally get do it work.
 
Thanks very much to you help.
 
Now When the status is changed for N/A the Last Run receive the value of TesteInstance
 
Sub TestSetTests_CanPost(FieldName) 
 

If TestSetTest_Fields.Field("TC_STATUS").Value = "N/A" then
TestSetTest_Fields.Field("TC_USER_17").IsRequired = True

 
      aux = TestSetTest_Fields.Field("TC_TESTCYCL_ID").Value
      'msgbox aux
 
      set myInstance = tdconnection.TSTestFactory.item(TestSetTest_Fields.Field("TC_TESTCYCL_ID").Value)
      set myRun =  myInstance.RunFactory.newlist("")
          myRunCount = myRun.count
          'msgbox   myRunCount
          'myRun.Field("RN_USER_07") = TestSetTest_Fields.Field("TC_USER_17").Value
          'msgbox myRunCount.Field("RN_USER_07")
 
          x = 0
          Dim Vetor(1)
          Redim Vetor(myRunCount)
          for each run in myRun
 
          'if run.Field("RN_RUN_ID") = 172 then
          'End If
 
          Vetor(x) = run.Field("RN_RUN_ID")
          'msgbox Vetor(x)
 
          if x = 0 then
            run.Field("RN_USER_07") = TestSetTest_Fields.Field("TC_USER_17").Value
            run.post
           ' xx = run.Field("RN_USER_07")
            'msgbox xx
          End If
          x = x + 1
 
          Next
 

End if


On Error GoTo 0
End Sub


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>