Forums

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

Automation rule to prevent logging hours after 10 days.

guillermo.casco@grey.com December 24, 2021

Right now Users logg hours into closed issues and management don´t want to allow that anymore.

I know that I can edit the "closed" status to Jira.permission.work.denied and that will not allow them anymnore to log hours, but management wants that they could log hours in closed issue only 10 days after issue is closed . After those 10 days they won´t be able to do it . (yeah souns crazy but it´s what they want) 

I know that there are automation rules,  and I have this simple query that can be applied to what I want with:



project = XYZ AND status = Closed AND updated <= -10d

Then: add -> Jira.permission.work.denied in closed status.

 

but I don´t find the Correct Action to Edit Status. The Edit issue option only allows to edit fields inside the ticket but I don´t see the "log hours" part.

Is this possible to be done in another way?

Jira.png

 

1 answer

1 vote
Fabian Lim
Community Champion
December 24, 2021

Hola guillermo.casco@grey.com

  1. The only way I could think of is using script runner and putting this code in a transition status postfuntion. Create a new transition that is hidden from the user and it calls itself (https://community.atlassian.com/t5/Jira-articles/How-to-create-global-looping-transitions-in-a-Jira-workflow/ba-p/1135968).
  2. Then add the following code: https://community.atlassian.com/t5/Adaptavist-questions/How-Can-I-Edit-Status-Properties-with-Behaviors-and-Scriptrunner/qaq-p/1128046
  3. Then use "Schedule" Trigger to execute the automation with the jql above that transitions the hidden status. 

I hope this hleps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events