Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

OTA Script : Attachments not stored on th repository on the Bug_After_Post Method

$
0
0

Hi,


I Use QC 12.0 for several months and I've got a problem adding attachments with OTA script
Here is my code in the Bug_After_Post Method:

 

Sub Bug_AfterPost

    idBug = Bug_Fields("BG_BUG_ID").value

   set mybug = BugFactory.Item(idBug) 'Retreive the bug

   if(myBug.Field("BG_USER_01") = "") Then
       '........
       ' send Message
       set xmlDocIssueAddResponse = EnvoiRequeteWS(messageWS)
       '........
      if(errorCode = 0) Then
           if myAno Is Nothing then 
                msgbox "Error Msg "
                myBug.Field("BG_USER_11") = errorMessage
                myBug.post
                myBug.refresh
            else
                 msgbox "Succeed "
                 myBug.Field("BG_USER_11") = ""
                 myBug.Field("BG_USER_01") = myAno.text
                 myBug.post
                 myBug.refresh

               

                Set attachFac = myBug.Attachments
                Set attachFilter = attachFac.Filter
            Set attachList = attachFilter.NewList

            for each att In attachList
                ' ........
               next
          end if
     end if

    set myBug = Nothing
End Sub

 

 

The problem : The list "attachList", in red on the text ,  is always EMPTY at this moment. However, the attachment exists and if we try to modify the bug after, the attachment appear !

 

It seeems that the attachment doesn't stored in the repository immediately , but ???

Hope someone have a solution for me :-)

Thanks !

 

Sandrine


Viewing all articles
Browse latest Browse all 5491

Trending Articles



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