I have a requirement …..when the defect is created, I wanted to hide “X” field and when the same defect status changed from “New” to “Closed” then “X” field should be visible. I wrote the following code and it worked when you create a new and close the defect. And, I posted this code under “Bud-New and Fieldchange”.
But the same defect when I submit with the status as “New” and when I opened by double (i.e. defect details window), the field is visible even the status as “New”. I tried to post the same code in CanPost or Afterpost ….tried diff. ways but it did not work. I am not expert in coding and not sure how to fix this one.
Version: ALM 11.
If Bug_Fields("BG_STATUS").Value = "Closed" then
Bug_Fields("BG_USER_09").IsVisible = True
Bug_Fields("BG_USER_09").IsReadOnly = True
Bug_Fields("BG_USER_09").IsVisible = False
Bug_Fields("BG_USER_09").IsReadOnly = False