I was going through the Automation rules possibilities to see if it was possible to apply a rule on an Issue depending on a field last update date, it doesn't seem to be available.
Anyone here has applied something similar in their rules?
Thanks
Hi @Mathieu Fairfield -- Welcome to the Atlassian Community!
Short answer: that may only be partially possible. I recommend describing what problem you are trying to solve (i.e., the "why do this") to help the community offer better suggestions.
Until we learn that...
There are some fields which work with the JQL CHANGED operator: https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CHANGED With that, a Scheduled Trigger rule could use JQL to test if something has changed / or not within a window of time. For example, checking if the Status has not changed for several days. But again that operator only works with a few fields.
The Field Value Changed trigger handles events for changes to a field. And so a rule could be created which saves the date / time of an update in a separate custom field, and then that could be checked separately with JQL, essentially doing what CHANGED does.
A brute force way to do this without the extra custom field is to call the REST API to get the issue's changelog, read / parse the issue changes, and then decide how to proceed. This may not work due to several possible rule limitations.
However...apparently not all field changes raise events for changes that can be detected by rules, and so those could not be detected with rules. Workarounds for those might be to try site webhooks.
Kind regards,
Bill
Hey Bill!
Here is the use case!
I have automated tests on a software and whenever a crash is encountered, it searches my jira DB for the callstack. If it's found, it updates a custom field "Occurences" with +1 on the value.
I would have used the last update date on the field to automatically close the issue after a week or 2.
I hoped something similar to"updatedDate" could be used on a field ID...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Like Bill suggested, introduce a date-time type custom field "Foobar" that stores the last update timestamp of the "Occurrences" field. Every time when you update "Occurrences", also update "Foobar" to the current date!
You can then use "Foobar" like any other field in JQL, using date-time arithmetics.
That's it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case, Changed can't be used. I suppose i'll have to script it and poke the api.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Although the CHANGED operator cannot be used for other fields, if you have saved a date / time custom field when the field changes, JQL may still be used.
For example...
project = myProjectName
AND myCustomFieldLastUpdated > startOfDay()
Where myCustomFieldLastUpdated is the date / time value refreshed by that other rule I described.
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.