Quantcast
Viewing all articles
Browse latest Browse all 14708

Re: When defect ID information available for new defect?

The reason you shouldn't update fields in AfterPost is that you will create a lock on the item that will remain after you leave the item.  The proper way is to user OTA API code to update the field. You aren't saying which version you are using, but as far as I know the Bug ID has been available in AfterPost in all versions at least up to 11.0.

 

Try this in Bug_AfterPost (assuming your custom field is BG_USER_01):

bugID = Bug_Fields("BG_BUG_ID").Value
Set myBug = TDConnection.BugFactory.Item(bugID)
myBug.Field("BG_USER_01") = bugID
myBug.Post
Set myBug = Nothing

 


Viewing all articles
Browse latest Browse all 14708

Trending Articles