Forums

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

Need automation rule in jira if time spent field empty during transition

siva
Contributor
September 13, 2023

Hello Team,

In my jira when issue transition from IN PROGRESS to DONE status user need to fill the Time Spent field in transition screen other wise comment has been created in the issue (Please fill the Time Spent field)

And I had set up the automation with above configuration with JQL condition and it is working fine here the screen shot

Time Spent Automation.png

But I'm facing the issue, when user already fill the time spent field and issue moved to Done status. When issue again reopened and move status from IN PROGRESS to Done status the automation doesn't works because on JQL condition, it showing Time Spent field already filled previously in issue. But I need to fill field again in transition screen.

Please help me on this how to achieve this issue by using automation.

 

Thanks,

SIV

3 answers

0 votes
Joost van Maasakkers November 16, 2023

@siva 

A different approach could be to use a label that is added when a change is made to the time tracking and you remove that label when it is moved from the done status to in progress.

That way you can keep the previous time tracking and check for that label on your original automation.

0 votes
Wojciech Wardaszko
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.
September 14, 2023

Hi @siva

If what I read between the lines is correct, you want the users to log time before or at the moment of transitioning to Done.

How about using a third-party App for automated time tracking instead? Our Clockwork Free supports automated time tracking that starts a timer any time the issue enters any active (blue) status (can be configured for specific statuses) and stops (thus creating a worklog for the assignee) whenever it leaves an active status, be it a Done (green) status, an Open (grey) status or another active (blue). The only limitation to this in Free is that you can have no more than 300 timers per month.

With the Pro version of our app, you get rid of any limits, and you can also set up a validator that will stop any chosen transition if there is no time tracked on the issue. You can read more about this here.

I hope this helps. Let me know if you have any questions - you can reach out here or directly through our service portal.

Cheers!

0 votes
Teja
Community Champion
September 13, 2023

Hi @siva 

Welcome to Atlassian Community!

You can clear the time spent value during the transition to reopen status through Jira workflow post-functions. Once the time-spent field value is cleared the automation will run without any problem and you can fill the time spent again.

steps to create a Jira workflow post function - 

1. Go to Re-Open transition, and click on post functions.

2. choose issue filed update and choose time spent and let the field value be empty.

Picture7.png

please accept the answer if this helps.

Thanks,

Tejaswini

siva
Contributor
September 14, 2023

Hi @Teja ,

Thank you for your response, and the Time Spent field is part of the worklog. Unfortunately, we are unable to clear the field. Is there any way to remedy the problem without removing the field value?

 

Thanks,

Siva.

Teja
Community Champion
September 14, 2023

Hi @siva ,

We are just clearing the time spent field value during the transition to Re-open and not deleting any of the work logged.

Let me know if you have any questions.

Thanks,

Tejaswini

siva
Contributor
September 14, 2023

@Teja 

The Time Spent field in my transition screen is showing  empty. However, if we wish to fill in the Time Spent field again, the automation would fail owing to a query in JQL.

The automation will only work if the worklog is empty and will not work if there is a value in the worklog.

Please let me know if there is anything else I can do.

 

Thanks,

Siva.

Suggest an answer

Log in or Sign up to answer