Forums

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

Why isn't the Changed operator working?

Elsie Carroll
Contributor
July 1, 2025

I'm trying to run a scheduled automation where, if a case has been in a certain status for more than a week, it makes a comment and changes the status to a different one.  The portions for specifying the statuses, the project, and the transitions itself are working, but it's applying to everything instead of just cases that have been in that status for more than a week.  My current wording is this: 

status changed before "-1w"

 

I have tried it with startOfDay("-1w"), now(), and after instead of before, but it either triggers daily on everything or it isn't working at all.  Where have I gone wrong?

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
July 1, 2025

Hello @Elsie Carroll 

Welcome to the Atlassian community.

You are made two different statements of problems in your post:

"it's applying to everything instead of just cases that have been in that status for more than a week."

"but it either triggers daily on everything or it isn't working at all."

The triggering of a scheduled rule is based on the Occurrence settings of the Scheduled trigger, not based on your JQL statement. So if the rule is "triggering" daily that is a different problem than if it is operating against issues other than the ones you intend to affect.

Have you tested the JQL through the Filters > Search Work Items screen? If you have not I recommend you do that to work out the JQL statement before trying to use it in an Automation rule.

It will enable us to help you more effectively if you show us screen images of your entire automation rule, the details of the trigger, and any component where you are trying to use the JQL statement. Sharing all the details from the rule execution Audit Log will also be helpful.

 

Trudy Claspill
Community Champion
July 1, 2025

Also, when using the statement

status changed before "-1w"

...can you provide an example of an issue that was operated against that should not have been included? Specifically I would like to see the Transition history for the issue.

Like John Funk likes this
Elsie Carroll
Contributor
July 1, 2025

Yeah, the different statements was me being unclear, sorry.  It's running on the schedule I have it set to, but it's triggering on all cases in the statuses I set it for, not just the one that has been in this status for more than a week.

Testing it through the filters brought up the appropriate cases at the time, but we ran into an issue where it kept running on one specific case, even after the status changing should have stopped it from running.

 

Screenshot 2025-07-01 at 1.49.55 PM.png

Like # people like this
Elsie Carroll
Contributor
July 1, 2025

Regarding the issue it was operated on, I don't believe I have access to any sort of Transition history, unless I'm looking in the wrong spot.  I can see where the automation ran the day after the status was changed out of and then back to the target status, but that's it.

Like # people like this
Elsie Carroll
Contributor
July 1, 2025

@Trudy Claspill  I was looking in the wrong spot for transition history, I'm very sorry.  It's been a long day.Screenshot 2025-07-01 at 2.18.22 PM.png

Like # people like this
Trudy Claspill
Community Champion
July 1, 2025

Your Automation interface looks very different from what I see in the Jira Cloud instances available to me. 

Can you tell me for what type of project you are trying to create this automation? Get the project Type information from the Type column on the View All Projects page under the Projects menu.

And can you tell me the exactly steps you took to get to that automation screen?

Like John Funk likes this
Elsie Carroll
Contributor
July 1, 2025

I just realized I forgot to clarify that this is using JMWE, not the built in Jira automations, which is likely why this looks different.  It's still using JQL, though.  Under the apps section of Jira admin settings, JMWE has a link for event-based actions and a link for scheduled actions, and this is a scheduled action.

This is for a service management project/Ops category.

Like # people like this
Trudy Claspill
Community Champion
July 1, 2025

Thank you for that clarification.

What are the Post Functions that are being run?

I am going to install JMWE on my instance to see if I can replicate the problem.

Like # people like this
Elsie Carroll
Contributor
July 1, 2025

The very short version of the functions is: leave a comment on the work item, then transition the work item.Screenshot 2025-07-01 at 3.13.05 PM.png

Like # people like this
Trudy Claspill
Community Champion
July 1, 2025

If the goal is to

- find issues that are in the specified statuses

- that were set to those statuses 7 or more days ago

- that have not had a status change within the past 7 days

then I believe the statement you need is:

and NOT status CHANGED AFTER "-1w"

That will look at the Transition history of the issues and exclude anything that has had a status change in the past week.

When you use 

status CHANGED BEFORE "-1w"

I think you are getting all issues with any status change having occurred prior to 1 week ago. I think it is not looking at only the date of the last status change

Like # people like this
Elsie Carroll
Contributor
July 2, 2025

That makes so much sense - I'll give that a test today and let you know if it works!

Like Trudy Claspill likes this
Elsie Carroll
Contributor
July 7, 2025

@Trudy Claspill It worked like a charm, thanks so much!  I was definitely getting tripped up by all the negatives and the ephemeral nature of time.

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events