Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to create an automation that fills in a custom field date from when it was placed in status.

Aiden Swartz June 5, 2023

I'm attempting to create an automation that fills in a "End Date" field that we've been using the date when the associated Issue's status transitions to a complete status. Screen Shot 2023-06-05 at 3.46.20 PM.png

In this case, the date would be changed to 5/15/2023. I didn't utilize Resolution via the Workflow until fairly recently, and I'm there's a load of completed requests that don't have an end date that is easily accessible/changed and thats able to be utilized in stuff like eazyBI.

I'm sure there's way easier and obvious ways to go about this, but if anyone knows what I should do, that would be greatly appreciated.

1 answer

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2023

Hi @Aiden Swartz -- Welcome to the Atlassian Community!

If I understand your question, you want to populate your "End Date" field when an issue completed, and you cannot use Resolved as issues did not set the Resolution until recently.

A work-around would be to use the {{issue.statuscategorychangedate}} as a source; this will be when the issue changed to a status with a "done" category.

To use this to set a date/time you will need to convert it from text, like this:

{{issue.statuscategorychangedate.toDate}}

Kind regards,
Bill

Aiden Swartz June 6, 2023

Great, this works perfectly @Bill Sheboy  . One more question though... I don't see "statuscategorychangedate" anywhere when looking at lists of available smart value inputs, but I may just be looking in the wrong spot. Is there somewhere you have that put down? Or was that something you just remembered.

Either way, thank you so much!

Like Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2023

I am glad to learn that helped.

Regarding that field, I knew about it from writing JQL over the years.  And automation seems to use the same REST API features to access issues...so it made sense it was there. 

You can identify all the possible smart values available for a rule using the how-to article below.  Basically you find an example issue, call the REST API with a browser, and look for your field.  This also helps confirm you have the correct smart value for a field, as smart values are name, spacing, and case-sensitive.

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

I also recommend periodically just paging through the smart value documentation, as they may add stuff before it is announced.  :^)

Aiden Swartz June 8, 2023

Thats great, thank you so much!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events