Update an issue status through automation after x time has lapsed
Asked by Wynand Bouchaud:

I'm looking to create a rule through Automation, that will update an issue status from 'In Progress' to Pending, once the issue reaches a certain amount of time in one setting. Is this possible, and how do I go about it please?

Thanks


Answers:
author: Bill Sheboy
body: Hi [@Wynand Bouchaud](/t5/user/viewprofilepage/user-id/5243090)

To help refine the issues you are finding, you could use the [CHANGED operator](https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CHANGED) from JQL in your trigger, perhaps like this:

```
project = myProjectName AND NOT status CHANGED AFTER -12h AND status = "In Progress"
```

This would find issues which are "In Progress" and which have been in that status for at least the last 12 hours. You may adjust the timeframe as desired, using the other time-related JQL functions. To learn more, please look here: <https://support.atlassian.com/jira-software-cloud/docs/jql-functions/>

Kind regards,  
Bill


author: Aditya Verma
body: Hi [@Wynand Bouchaud](/t5/user/viewprofilepage/user-id/5243090) ,

Yes it is possible with Automation Rules. You can create a "Scheduled" trigger and configure your JQL Query (which can filter out tickets based on your time requirements). Please refer the screenshot below.

You can also refer the Automation documentation [here](https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/).

![automation.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/263073iA14801C82DEA4472/image-size/large?v=v2&px=999 "automation.JPG")

Thanks,  
Aditya

comments: author: Wynand Bouchaud
body: Hi [@Aditya Verma](/t5/user/viewprofilepage/user-id/620284) ,

thanks so much for your quick response. I've now managed to get that far, but I think my JQL is not liking my parameters being set, per the below screen shot. The issue I'm facing is to ensure that the query runs, and only executes once a ticket is over 6 hrs, but I'm getting the error. Am I doing something wrong, or should I request higher access?![JQL.png](https://community.atlassian.com/t5/image/serverpage/image-id/263114i0E4FD25C5C1BAC8F/image-size/large?v=v2&px=999 "JQL.png")


author: Wynand Bouchaud
body: I've discovered the answer, end should look like this:

AND status = "In Progress" AND updatedDate \<= "-6h"

thanks though [@Aditya Verma](/t5/user/viewprofilepage/user-id/620284)


author: Anthony Morais
body: Hi [@Wynand Bouchaud](/t5/user/viewprofilepage/user-id/5243090) , as the friend said in the previous answer, yes it is possible with the Automation Rules.  
Start with a "**Scheduled** " trigger.  
Then, in the example below, I created a filter with a project created greater than or equal to 6 hours and with a status of Work in progress.  

![JQL.png](https://community.atlassian.com/t5/image/serverpage/image-id/263135i4596DF184692A492/image-size/large?v=v2&px=999 "JQL.png")  

<br />

Then add "Transition Issue" action to Pending status.

![Transition.png](https://community.atlassian.com/t5/image/serverpage/image-id/263136i46C6807072D7E3E8/image-size/large?v=v2&px=999 "Transition.png")

If it works please mark as accepted answer.

Thanks!


author: Aditya Verma
body: [@Wynand Bouchaud](/t5/user/viewprofilepage/user-id/5243090) Glad that you were able to do it.


Tags: cloud