Automation: when issues transitioned to "Done" display "actual end date" with current date. JQL?

Fuji
Contributor
May 4, 2023

Hi Jira Community,

 

I'am want to make an automation so that when an issue is transitioned to "Done" it will automatically set the custom field "actual end date" to current date (not due date or target end date, but the actual date it's moved to "Done"). 

My primary question:

- What is the correct JQL?

Supplemental questions:

- Maybe are other easier ways than JQL?

- Finally, should I start learning basic JIRA JQL? (I'am new in the job as a project coordinator in IT - no coding experience).

 

 

Here is my JQL, that didn't work:

{
"fields": {

"actual end date": {now.dayOfMonth}
}

 

 

Audit log regarding the automation that was tried to implement:

"Action details:
Edit issue
Error while parsing additional fields. Not valid JSON."


Screenshots of 'Custion field "actual end date"' automation:
Webklip_4-5-2023_12645_dbf-it.atlassian.net.jpeg
Webklip_4-5-2023_12624_dbf-it.atlassian.net.jpeg
Best regard
Fuji - project coordinator in IT department (project adminitrator in Jira)

2 answers

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2023

Hi @Fuji 

Why don't you do the following?

automationsss.png

Make sure to choose the "Actual End Date" on the field and type {{now}} on its value.

Fuji
Contributor
May 4, 2023

Thats really wierd. Yesterday when I made the custom field "actual end date", it was not shown in the "Choose field to set..." drop-down menu. Maybe it took time to update? I don't know. 

But thanks anyway, I think it will work, or else I will write again. :)

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2023

@Fuji it doesn't take time to update. It instantly available. But if you created the field on another tab and you had the automation open, then this field will not appear in the dropdown. You would have to refresh your screen in order for the field to appear.

Let me know if you managed it!

Fuji
Contributor
May 8, 2023

It worked. Thank you very much Alex :)

0 votes
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.
May 4, 2023

Hi @Fuji 

Are you using a Company-managed project (CMP) or a Team-managed project (TMP)?  You can find this information at the bottom-left side of the page in the expanded area.

Where was the custom field "actual end date" created?

The reason I ask these questions is that custom fields can be defined at a global scope for CMP or at a project scope for TMP.  And for CMP the field may need to be added to the views for the project to be accessible to the rule.  Can you see your custom field on the view issue page when you look at an example issue?

Kind regards,
Bill

Fuji
Contributor
May 8, 2023

Hi Bill,

 

It is a company-managed project.

I create the custom field under project setting --> issue types --> just took "date" in the side, and then i renamed it "actual end date". And I think I could see my view issue page at the time, as far as I remember.

I don't know why it was not shown, but maybe Alex (above messages) was right, that i had several tabs open.


Nonetheless, everything works and the automation is active. Thank you very much for your message and your wanting-to-help attitude :)

 

Kind regards,

Andreas

Like Bill Sheboy likes this
Dominik
Contributor
November 13, 2024

{{now.convertToTimeZone(issue.reporter.timeZone)}}

-> This would also take the time zone into consideration

Suggest an answer

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

Atlassian Community Events