Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

jira automation - get started

Oliver Berger March 24, 2022

Hi All,

during the last couple of days, i created some jira automation rules, so i have some questions.

Is there any more comfortable way, than using the builtin debugger? maybe a vs code extensions with syntax highlighting and syntax checking and help and stuff? 

is there a nice way to share code snippets with the community?

Is there a way to participate in improving the existing documentation? 

Thanks Oli

2 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
March 24, 2022

I'm afraid the built-in editor is the only option at the moment.

Really good idea for an IDE plugin though!

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.
March 24, 2022

Hi @Oliver Berger 

Yes, and...to Nic's ideas:

Here is the Atlassian library of example automation rules, and I have seen their product people posting about perhaps having a similar library for the community members to share rules.  No timelines were noted on doing that.

Until then...often community members add posts/discussions to share ideas, like these ones:

For the last question about participating in improving documentation, I recommend when you find a page with problems, use the "Provide feedback on this article" link at the bottom to offer suggestions.  I find the team responds well when specific things are raised.

And, there are open suggestions to make the documentation more comprehensive, perhaps like the REST API information.  Here is a suggestion I submitted along those lines: https://jira.atlassian.com/browse/JIRAAUTOSERVER-103

Kind regards,
Bill

Like Curt Holley likes this
Oliver Berger March 25, 2022

Thanks @Nic Brough -Adaptavist-@Bill Sheboy for your answers.

I think, i do not need to loose any words on the quality of the built-in editor.

The template library is "nice", but if you are dealing with smart values, it is not very helpful. 

Something like this would be easy to use from my PoV. But a common tag is the key to make this work.

https://gist.github.com/search?q=%23jiraautomation+changelog&ref=searchresults

Also added a vote to your issue, and provided some feedback on the page. Maybe someday there will be an "else" mentioned in the "if" documentation...

Cheers Oli

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2022

Hi @Oliver Berger - I've been meaning to write something up about my experiences exporting rules as JSON and then treating them as code.

As I wrote here:

  • Rules are formatted as JSON, which is a tool for storing/presenting data in a human-readable format.
  • There are lots of tools/libraries for parsing/manipulating JSON files.

Minimally, if you just run your rule(s) through jq to apply some light formatting, it's actually quite manageable to edit the JSON in any code editor. (I actually went so far as to use a templating system to programmatically create rules where a Checkbox Field's options were mapped to specific Assignees.)

Unfortunately actually testing and debugging manually hacked JSON rules requires importing the rule back into Jira and running it.

For particularly complex rules, you could check the formatted JSON into a source control system like Bitbucket, and even if you use the editor, there's still value in exporting again and checking-in the JSON to track changes, etc.

I've *ALMOST* found an endpoint for exporting all of the rules:

https://MYSITE.atlassian.net/gateway/api/automation/internal-api/jira/SOMEHASHEDKEY/pro/rest/GLOBAL/rule/export

(That's from looking at the Export link from the menu here: https://MYSITE.atlassian.net/jira/settings/automation#/rule-list?systemLabelId=all&page=1&pageSize=20)

So with that in hand, assuming you could get an API key that Atlassian would accept, you might be able to automate a mechanism to "snapshot" your rules on demand, or on a schedule, and then check those into a repo for tracking.

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 26, 2022
Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events