I would like to provide a way for our users to be able to see what automation rules exist within our instance. This would help avoid duplication of rules and allow useful rules that maybe someone isn't aware of to be considered for enablement within additional projects/areas.
My initial thought was to manually create a Confluence page and add details for every automation rule. This seems like a maintenance nightmare to me though. We would need to ensure anytime a rule is updated, the details pertaining to that rule within this Confluence page are also updated. If a rule is added, better remember to add it to the Confluence page. Also, need to ensure any automations created/updated by project admins are added/updated within the Confluence page...
Any thoughts/suggestions on a potential way of automating an "Automation Rule Library" Confluence page?
Hi @Gary Spross
I'd suggest the REST API, but not sure how much is available based on documentation, and that this feature request exists - [AUTO-51] Official REST API to manage rules, export/import and access automation audit logs
---
I've seen it done in a manual way, which was...
^ Not ideal I know, but it reduces the work a small amount as Project-specific rules can often be very similar with just minor tweaks.
Ste
Thanks @Ste Wright!
After creating this post I found that feature request and voted for it. It's only 3 years old, so maybe there's hope! I figured it would end up being a manual process, so I guess I'll get started! Thanks for your suggestions on how best to document.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gary Spross
Adding to Stephen's suggestions...
You could regularly export all rules from the global admin area as JSON, and with some parsing capture a few rule details for documentation. I recall seeing another community post about doing that, although I have not tried to create such a parser...yet :^)
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.
Good thought! I'll look into writing a script to parse out the necessary data and then be able to put that directly into the Confluence document. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Gary Spross
Someone reminded me of this article by @Darryl Lee which includes various scripts, such as parsing exported rules into CSV for documentation in Confluence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ohey yeah, and be sure to check out my last comment in that article which has the magic command to extract the rules with a simple curl command (as provided by @Andras M_ from Atlassian, with a small tweak for the --user bit):
curl --location 'https://your-site.atlassian.net/gateway/api/automation/internal-api/jira/{cloudId}/pro/rest/GLOBAL/rule/export' \
--header 'Content-Type: application/json' \
--header 'Cache-Control: no-cache' \
--user me@example.com:my-api-token > automation-rules-$(date '+%Y%m%d').json
What I might do is actually change the filename to NOT have the date, but instead upload it to a designated Confluence page as an attachment, which would take care of "versioning", and THEN if you used something like Table Filter, Charts & Spreadsheets for Confluence you could then parse it out into a nice table, probably with links and stuff, since that add-on provides all kinds of fun hackery (SQL queries? C'MON!)
Although as also mentioned in the comments, if you alternatively/also uploaded that JSON to an actual source code repository like Bitbucket, Gitlab, Github, you could theoretically get "real" versioning and the ability to diff changes, etc. which as an admin, is VERY appealing.
@Bill Sheboy even had dreams of an IDE (doubtful Atlassian will ever do _that_), or at least API for automation rules that could then let somebody write a connector for VS Code or some other IDE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Darryl, whenever the REST API becomes available, I'm gonna start writing my own IDE / VS Code extension for that...just to pass the time ;^)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill, I would love to be a beta-tester for that. On the other hand, I probably should get outdoors more, maybe get back into snowboarding... :-}
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.