Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation: Issue status "In progress" sets target start; issue status "Done" sets target end

April_Delay
Contributor
February 16, 2023

We have the server version of Jira, so I cannot use Post-functions in the workflow, which would easily solve this... Now I have to try automation.

 

When any issue type is transitioned from "To Do" to "In Progress", I want the Target Start date to be set to %%CURRENTDATE%%

When any issue type is transitioned to "Done", I want the Target End date to be set to %%CURRENTDATE%%

When any issue is set to "To Do", I want target start and target end cleared.

 

I don't understand smart values so if that is involved, please be very detailed =)

 

2 answers

1 accepted

0 votes
Answer accepted
April_Delay
Contributor
February 16, 2023

Screenshot 2023-02-16 154137.png

Aaron Rose October 5, 2023

What if we wanted to show now +45 days?

Thank you!

Aaron

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2023

@Aaron Rose 

As per the documentation on smart values for dates and times at

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#--

use the plusDays() function

{{now.plusDays(45)}}

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2023

Hello @April_Delay 

Which version of Jira Server are you using, and which version of the Automation app are you using?

Have you tried to construct the rule? If so, please show us what you have so far.

Link to documentation: https://confluence.atlassian.com/automation/components-in-jira-automation-1141480614.html

 

The basic structure of the rule would be:

TRIGGER: Issue Transitioned

- You can specify the To and From statuses in the trigger. You would have one rule with this trigger configured for the transition from To Do to In Progress, one for the transition to Done, and one for the transition to To Do.

CONDITION: Issue Fields Condition

- You may want to add a Condition to check the Issue Type for the issue that triggered the rule. If the date fields aren't used in all issue types, then you would use this condition to check that the triggering issue is one of the Issue Types that does use the fields.

ACTION: Edit issue

- Here you would specify the field you want to set/clear and the value to set it to, or no value if this is the rule to clear the field.

 

 

If you want to set a Date only field (Date Picker) vs. a Date/Time field to the current date you would use the smart value 

{{now.jiraDate}}

You can find more information about working with smart values for Date fields here:

https://confluence.atlassian.com/automation/examples-of-using-smart-values-with-dates-993924630.html

You would use the Edit Issue action and select the field you want to set. You can see examples of smart values being used to set fields in this document, in the section for the Edit Issue action.

https://confluence.atlassian.com/automation/jira-automation-actions-993924834.html

April_Delay
Contributor
February 16, 2023 edited

Thank you for the information. When I add the Action: edit issue, The Target Start and Target End are not available. I do have the field ID but I don't know who to write JSON.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2023 edited

I haven't worked through setting these fields myself in Automation, but I found another thread where another person has asked questions about setting these fields. That might help you.

https://community.atlassian.com/t5/Jira-Software-questions/Automation-Solve-the-error-quot-The-Target-start-must-be-of-the/qaq-p/2271601

I also found this post, but they were talking specifically about Jira Server automation.

https://community.atlassian.com/t5/Automation-questions/How-can-I-set-Target-Start-to-present-day/qaq-p/1850821

When I have time, I'll try to work on it myself and post again.

April_Delay
Contributor
February 16, 2023

Thank you!!! This led me to the solution!

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2023

Glad to help!

Can you share your solution (in a new Answer to your own Question) and accept your Answer to help other users find posts with working solutions?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud, our FedRAMP Moderate offering, is coming soon! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events