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

Help with a workaround for automation

Harry Bob
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.
May 27, 2020

Hey everyone,

 I used automation to add a comment after 'x' amount of days but there is a bug within Jira that wont run the rule unless I run the rule as myself and not the user. If I run the rule as myself(admin) I get all the notification and replies by customers which is not convenient and my name appears on the comments

 

This is what it looks like

Snip20200528_801.png

This is the error

 

Snip20200528_802.png

I am trying to find a workaround and to use 'Automation for Jira' instead. I've come up with a rule that is scheduled to run everyday. I only want the rule to execute if the status open has not been changed for 5 days.

I am only able to come up with the JQL below. I don't seem to be able to use '>=' nor am I able to figure out what else i can use as if I use the JQL query below it will still execute even if its in days 1, 2, 3, 4 and 5.

 

status in (open) AND NOT status changed AFTER -5d

 

Can you help me figure out a query so it only executes on day 5?

 

Thank you

 

 

2 answers

1 vote
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 1, 2020

Hi @Harry Bob  - Is it just one particular status that you need the notification for?

What about: 

project = ABC and status = "Open" and status changed to "Open" before startOfDay(-5)

Harry Bob
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.
June 1, 2020

@John Funk

 

I'll give this a shot. Thanks!

Harry Bob
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.
June 1, 2020

Hi @John Funk 

 

project = ABC and status = "Open" and status changed to "Open" before startOfDay(-5)

 

Does the above JQL mean status in 'Open' for the last 5 days? 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2020

It means it was moved to Open more than 5 days ago and is still in Open. Is that what you were looking for?

Like Sebastian Mühleis likes this
Harry Bob
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.
June 2, 2020

Hey @John Funk 

 

Ohh I think this is going to work! If I use this JQL using automation I can create a rule so that it close off tickets that has been in 'Open' status for more than 5 days?

 

On a side not I thought Jira doesn't count the amount of time a status stays in a status. Is that correct?

https://community.atlassian.com/t5/Jira-Service-Desk-questions/Does-Jira-track-or-count-amount-time-time-an-issue-is-in-a/qaq-p/1392100

Harry Bob
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.
June 2, 2020

Hey @John Funk 

 

Would this also be the same thing?

 

project = ABC and status = "Open" and NOT status changed after 5d
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2020

That did not yield the same results for me. It include issues that just moved to Open yesterday. 

Harry Bob
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.
June 4, 2020

Hi @John Funk

 

I used your JQL for my automation rule to close off issues in the 'Waiting for customer' status more than 7 days.

 

For a few it executed for ones that only around 3 days? 

 

Would you know why?



This is what I have 

 

Department in ("Platform Support") AND status in ("Waiting for customer") AND status changed to "Waiting for customer" BEFORE startOfDay(-7d)

 

Snip20200605_899.png

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2020

Did you run the query in the advanced filter search first to see what it would show to verify?

I see no reason why it would have picked that one up.  :-(

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2020

Was the issue moved to Waiting for customer prior to the time 3 days ago? If so, it is probably picking up the original date. 

Harry Bob
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.
June 8, 2020

Hi @John Funk 

 

Ah so Jira doesnt know to use the latest status as source of truth and is also picking up statuses in the past as well?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2020

Right. It keeps a history, but the only value showing on the screen is the latest date for when it moved into that status. You don't have access to the history using JQL nor are you able to tell it which date to use.  :-(

You could create a custom field that is date/time stamped when the card moves into that field (be sure to replace the current value). Then use the custom field in your rule above.  :-)

Harry Bob
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.
June 9, 2020

Hey @John Funk 

 

Please correct me if Im not mistaken. The JQL query you provided me only works if the status hasn't been changed for 5 days or more. 

If the status has changed in between those 5 days and happens to be in the 'Open status when my automation rule is run it will still execute yeah?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2020

That's correct. The way around that is probably with the changed to like you had in the other query above. Did that work for you? If not, what was not correct about it?

0 votes
Sebastian Mühleis
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.
May 28, 2020

Hello @Harry Bob ,

at first glance it seems to me as if you have two options:

1. You can make use of workflows (or rather the transition functions in your workflows). To me it sounds as if really any of the transition functions could help you. You find a great webinar here: https://training.atlassian.com/customizing-jira-workflows

Since I did this course (and some additional courses) I find myself to be really well-suited to generate even complex workflows :-)

2. Or you can implement some automation rules, as you assumed/suggested yourself.

Here you find an extremely good webinar, in which you get to know automation, very practical examples and also a playground where to test them (without using your automation executions - if you have limitations): https://www.atlassian.com/webinars/software/getting-started-automation-jira

In this webinar you will also get used to the rule playground. I was curious and played a little and it seems as if your wish can easily be granted by an automation rule (make sure that you have enough executions - if not definitely use the post function described in 1.; and definitely use the rule playground to test your automation rules, as you don't waste any executions there)

rule_playground.PNG

If you need further help let me know - I was fighting your fight roughly two months ago, but am a happy man by now ;-)

And I'm not sure which option is the better one for you. You might have to test it - or maybe some wiser member has deeper knowledge of this topic and can help.

Harry Bob
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.
May 31, 2020

Thanks @Sebastian Mühleis

 

I watched the webinar and it was somewhat helpful. Does seem quite powerful in what it can do but I don't think its able to do what I want :(

 

Just found out that there is no counter on the statuses

https://marketplace.atlassian.com/apps/1219732/time-in-status-for-jira-cloud?hosting=cloud&tab=overview

 

So I'm unable to send out notifications after x amount of time in a status which is frustrating. I appreciate your assistance those webinars were at least interesting to watch :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events