Hey everyone,
I'm looking to create the following Jira automation:
- When any ticket is in the status "I'm Open" for exactly 40 minutes, automatically create a ticket
I understand the automation part of it, just having trouble writing a JQL query. Here's what worked for me on first attempt:
project = "XYZ" AND status = "I'm Open" AND status CHANGED BEFORE -40m
The above query within the automation rule created the ticket automatically on first attempt, but when I tested it again it won't create additional tickets automatically. I'm assuming this is because it recognizes more than one ticket over time through that JQL query, thus, not following through with the automation.
Below is a similar JQL query I created that works as well, but is for issues that are greater than or equal to 40minutes:
project = "XYZ" AND NOT status CHANGED AFTER -40m AND status = "I'm Open"
In short, I'm simply looking for a way to modify one of the JQL queries above to grab an EXACT time (i.e. =40m). I've read that JQL cannot grab exact times, but is there a work around via automation that could do this?
Thanks for the help!!
Would you share your rule? how do you plan to trigger the rule, Since your scale is minutes, do you mean to schedule the run on every minute? I don't think it is possible. The minimum is 5 mins, and you would lose tickets since you are looking for exactly 40 minutes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Leal Essentially:
When an issue is in the I'm Open status for 40minutes, create a General issue ticket within project ITS automatically.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Akash Panchal I don't think you are going to achieve what you want. The trigger condition is on real time, then the JQL will apply to all the universe of issue that satisfy the condition, not a condition for the triggered issue. I would say there are two issues here:
1. The trigger condition, should not base on issue transitioned (you are looking for something that happened in the past), you would need a rule that is triggered based on schedule, but you have a minimum threshold of 5 minutes, as per my understanding.
2. Because of the threshold of the previous item, you cannot find exact -40 minutes, but rather a range.
I would suggest to create a rule based on schedule of 5 mins, which is not too much efficient, because the rule will run every 5 minutes, then check for a condition based on field status Status Category change for the condition.
For example:
then
You need in some how to be able to not take into account issues that already were processed through the previous call of the JQL, otherwise every time it will be triggered again. For example to add a label when the issue match the condition. For example: PROCESSED or something like that, so next time it doesn't appear in your query. You would need to modify the query to include also issues where the label is not present, for example labels not in (PROCESSED).
Since the rule will run every 5 minutes you will have a threshold of 5 minutes, not exactly 40 minutes.
I think you can put the condition in JQL this way too:
status in ("IN PROGRESS") AND statusCategoryChangedDate <= -40m AND statusCategoryChangedDate >= -45m
I guess you get the idea, so you can adjust it to your specific scenario.
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Leal Sorry for the late response, your guidance above helped me create this scheduled automation rule! The missing pieces for me were using scheduled automation and updating the label system field once an automation rule has been executed.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.