Multiple Trigger Events

Matthew Huston
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2019

I am looking for a way to grab and report on all issues that have had a field value change in the last day. JIRA doesn't allow for the "Changed" operator to be used against custom fields. Project automation has a "Scheduled" trigger and a "Value Changed" trigger but I can't have them both go off. Basically I want: 

At 7pm everyday, send an e-mail out for all issues that have had "X and "Y" value changed in the last day. I was attempting the following inside project automation: 

When Field Value Changed

IF issue is in JQL (updated >= startofDay(-1d)

Send E-mail

 

Any thoughts on a good way  this can be done with project automation that maybe I'm just missing? 

2 answers

0 votes
Mykenna Cepek
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.
December 23, 2022

Perhaps using Entity Properties on each Issue of interest would help. I haven't tried this, but it might be worth exploring.

The key concept would be to store the "old values" for an Issue in one (or more) Entity Properties on that Issue. Then you can compare those old values to the current values.

Your rule running once per day would first compare the old and current values and generate the email. The rule would also clear those Entity properties after use.

_ _ _ _ _ _ _

If you don't need the old values in the email, an alternate approach would be to use the Entity Property as a simple flag indicating that a value changed. Then you could have one rule trigger when those values change, and that rule would just "set the flag" in an Entity Property on that Issue. Then your daily rule would inspect all the Entity Properties and generate the email based on the "set flag values" in the Entity Properties, and then clear the flag.

I don't believe searching for Entity Property is natively supported in JQL (maybe via certain add-ons?). But you could iterate on all Issues changed in the last day and check Entity Properties on each.

0 votes
Iago Docando
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 27, 2019

The first mistake would be the trigger, according with what you're saying it should be a CRON expression: 0 0 19 * * * (19h, 0m, 0s, everyday).

The most pressing problem is that, like you say, the CHANGED operator is not supported with custom fields. This means that you can't search for an update just in those X and Y fields. Updated will include any update in any field, status, comments, etc.

Maybe you could design a workaround based in the verynature of your process... Let's say that those X and Y fields start empty and once they have a value they don't change. You could search for updated >= startOdDay(-1) AND customField_X is not EMPTY and customField_Y is not EMPTY.

Of course you'll be able to think of a better option for a workaround since you have a much deeper knowledge of your particular workflow.

I hope it helps somehow. Maybe I'm missing something and it can be done so let's hope someone else can chip in :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events