I'm planning to regularly query an external service using Jira Automation's web requests, running the query every few minutes. Instead of hardcoding a fixed time period into the API query, I'd like to dynamically use the timestamp of the rule's last successful execution. This would allow the automation to handle Jira outages more effectively, ensuring that no data from the external service is missed.
Is there a Smart Value that stores the date and time of the rule's last successful run?
Hi @flaimo
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
Let's assume your rule looks like this:
The key is what options are selected for the Send Web Request action, as it may halt the rule or continue processing. If you are halting on errors, the rule could invert that and when the call succeeds, save that date / time for monitoring: in a work item custom field or entity property, in a project entity property, etc. Then use a dashboard or other mechanism for reporting.
However, if instead you are asking more generically about any rule success / failure monitoring...
There is no smart value stored with work items (formerly called "issues") for the last successful automation rule execution; that information is only in automation audit log, and...
There is no public REST API yet for automation rules and their logs. Here is the suggestion to add that feature, which is currently marked as "in progress": https://jira.atlassian.com/browse/AUTO-51 (You may find posts about people using discovered, internal endpoints and I recommend against using them.)
Even if you had a REST API to view the logs to detect success or failure, that may not help. The reason is a rule may "succeed" and not complete the expected processing. The specifics depend upon what the rule is intended to accomplish.
Finally, your post seems to indicate you are on a Free license level. Is that correct? If so, I suspect you may consume your monthly usage limit when a rule with a scheduled trigger runs too frequently AND performs a countable-action.
Kind regards,
Bill
Hi @flaimo ,
Since that smart value doesn’t exist yet, you can use a workaround:
Here’s the idea:
After the rule runs successfully, have it store the current time somewhere (like in an issue field, or with an entity property).
On the next run, your rule can read that stored time and use it in your web request.
After the request, update the stored time again.
Think of it like writing down the time in a notebook every time your automation goes out. Next time, it checks the notebook to see when it last worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a reminder, when posting content generated by a bot / AI tool, the community guidelines require disclosing the source in the post text.
To learn more, please review the guidelines here:
https://community.atlassian.com/forums/custom/page/page-id/rules-of-engagement
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.