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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,361
Community Members
 
Community Events
184
Community Groups

Syntax validation of Automation's Mustache Expressions?

Edited
Martin Cleaver
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.
Aug 10, 2022

When debugging an Automation that uses a complex expression, the single-line dialog boxes are difficult to work with.

Snag_4ad420.pngThe dialog box is too small (expressions can be multiline), doesn't provide syntax highlighting, and can't give immediate feedback to me the user if there is a simple mismatch of parenthesis or braces. Or if sections are not properly nested.

IntelliJ Community Edition has a Handlebars/Mustache - IntelliJ IDEs Plugin that can do this. So I find myself pasting between IntelliJ and Automation. 

But even that does not work well as the plugin refuses to accept:

  • issue.Custom Field Name - doesn't like spaces, with or without double quotes
  • close of debug {{/}} ({/debug} is okay) 

And this workaround doesn't see the JQL... such that it cannot ensure that the parenthesis are balanced. Not ideal.

Has someone got another suggestion to make debugging easier on the eyes? Ideally for DC... though I appreciate that is a long ask.

The code is at intellij-plugins/handlebars at master · JetBrains/intellij-plugins · GitHub if someone wants to take it upon themself to adapt it.

Thanks,

   Martin.

1 answer

0 votes
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.
Aug 10, 2022

Hi @Martin Cleaver 

I added this suggestion to improve automation rule validation, and sadly it has moved to the dreaded "Future Consideration" status: https://jira.atlassian.com/browse/JSWCLOUD-22692

For complex smart values and JSON, I write them initially in tools like Notepad++ so I can use the syntax highlighting and bracket matching.  Then I save snips of things I use often to reduce errors before pasting into rules for testing.

Kind regards,
Bill

Martin Cleaver
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.
Aug 10, 2022

Hey Bill.

Are there particular plug-ins you use in Notepad++? 

I use the JSON ones - is there something for JQL or Mustache?

Kind regards & thanks,

Martin

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.
Aug 11, 2022

I am currently only using the JSON ones.  Probably worth some searches for JQL and others support, so I'll look around a bit.

Like Martin Cleaver likes this
Martin Cleaver
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.
Aug 17, 2022

I did discover that spullara/mustache.java: Implementation of mustache.js for Java (github.com) is the library used by Jira Automation on DC.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events