Forums

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

Provide visibility of automation rules within instance

Gary Spross
Community Champion
April 9, 2024

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?

1 answer

1 accepted

3 votes
Answer accepted
Ste Wright
Community Champion
April 9, 2024

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...

  • Global rules were documented in Confluence
  • Project-specific rules were only included once these were multi-Project
  • Rules were reviewed once per month to locate duplicates or similar rules, and switched to global/multi-project if these existed

^ 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

Gary Spross
Community Champion
April 10, 2024

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.

Bill Sheboy
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.
April 10, 2024

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

Like Ste Wright likes this
Gary Spross
Community Champion
April 10, 2024

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!

Like Bill Sheboy likes this
Bill Sheboy
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.
April 11, 2024

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.

https://community.atlassian.com/t5/Automation-articles/Hacking-Parsing-Automation-Rules-with-JSON-for-Fun-and-Profit/ba-p/1984033

 

 

Like # people like this
Darryl Lee
Community Champion
April 11, 2024

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. 

Like # people like this
Bill Sheboy
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.
April 11, 2024

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 ;^)

 

Like Darryl Lee likes this
Darryl Lee
Community Champion
April 11, 2024

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... :-}

Suggest an answer

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

Atlassian Community Events