Absent Member.. Uzi Absent Member..
Absent Member..
357 views

Updating closing date field automatically

Hi,

I need to write a script that do this:

If status is changed to "closed", than

Insert to Closing_date field the date of today.

How can I write this?

thank you

uzi

0 Likes
2 Replies
Highlighted
Super Contributor.. praveen_hpqc Super Contributor..
Super Contributor..

Re: Updating closing date field automatically

Hi Uzi,

May be this code will work for your requirment

Sub Bug_FieldChange(FieldName)
If FieldName = "BG_STATUS" Then
If Bug_Fields.Field("BG_STATUS").Value = "Closed" Then
Bug_Fields.Field("BG_CLOSING_DATE").Value = Now
End If
End If

Thanks
Praveen
Tags (1)
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Updating closing date field automatically

What you are asking for should be default behavior, so no workflow should be needed. What might confuse things is that the field is not populated until after you have saved (and refreshed) the defect with the Closed status.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.