In this thread @Bill Sheboy stated some suggestions about maybe using Notepad++ to help build more complex smart values like
{{#=}}0{{#lookupIssues}}{{#if(equals(status.name,"In-Progress"))}}+1{{/}}{{/}}{{/}}
Bill, could you maybe go a bit more in specifics? Which Notepad++ plugin(s) do you use for this? I tried finding something about 'expressions' in my Visual Studio Code but couldn't really find the extension there. Also, I wouldn't know which 'programming language' to select in my VSC to get the right formatting. I tried json and xml but those just return errors.
Any help would be appreciated!
Currently, I am only using JSON plugins with Notepad++ to help with rule writing, expression validation.
There have been improvements over time in the validation of rules during edit, such as these recent ones:
IMO, these new features need additional work / validation testing. I recall other suggestions to add autocomplete to the rule editor for smart value expressions, but given the dynamic nature of rule scope's impact on smart values, I hypothesize that would cause further performance problems in the editor.
Several community members have suggested creating VS Code extensions to create another rule editor, and which would allow better version management of rules (via source control tools). At this time, I do not believe there is a public REST API which would enable such capabilities. Here is the suggestion to add those endpoints: https://jira.atlassian.com/browse/AUTO-51
Others such as @Darryl Lee have tried to help with documentation and rule parsing outside of Jira: https://community.atlassian.com/t5/Automation-articles/Hacking-Parsing-Automation-Rules-with-JSON-for-Fun-and-Profit/ba-p/1984033
I welcome learning others' thoughts on such improvements to the rule editor, or perhaps external tooling to help automation writers. Thanks!
Kind regards,
Bill
Thanks for all the tips @Bill Sheboy !
I've bookmarked some of the pages you've suggested including the current one - I'll dive into it some more once I get around to it.
I'm wondering what the differences are between your setup (notepad++ with JSON plugin) and my setup (using VSC). For instance, the script you shared in the linked topic shows red/with problems in VSC:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I was not more clear, as I am only using the JSON plugin to help check formatting but not the automation syntax. It appears you are getting better highlighting results with VS Code than I was with Notepad++.
I have seen others in internet posts describe using other language plugins which support mustache syntax to help, but none are a good fit for the Atlassian Automation language: as far as I can tell it both extends and varies from the mustache specs I have found.
Last year I considered writing an old-school, BNF spec for the language, feeding that to a canned parser to build a plugin, but never got back to it. Maybe I'll get back to that this year :^)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Bill,
Thanks again. I'll at least try putting it in VSC for now, to check for obvious errors (and ignore some of the problems shown already).
And, I'll likely follow your replies to see where you're using these more complex statements to store them for later.
I know what I'll put on my Christmas letter to Santa this year! ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried the community feature to Bookmark posts under the ... menu next to post heading? Bookmarks will store them in a list accessible from your profile avatar at the top-right of the page.
That may help when tracking useful smart value expressions to provide context and explanation for them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.