You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
If, like me and countless others, you're coming to Jira Cloud after years of working on Jira Server or Data Center. One of the first things you might run into is the fact that your favorite old plug-ins (fine, apps, add-ons, whatever Atlassian is calling them today) you used to use to create workflow validators or conditions don't work quite the way they used to.
I'm talking about stalwart standbys like Jira Workflow Toolbox, Jira Miscellaneous Workflow Extensions, Power Scripts and ScriptRunner.
So here's the deal: Atlassian changed things up. Now the only way that plug-ins can provide validators and conditions is via a tricky language called Jira Expressions.
It's syntax is kind of Javascripty (so says @Radhika Vijji _Innovalog_), but if you're like me, and don't know much Javascript (or run screaming from it), it can be a tough learning curve.
Luckily some add-ons provide handy templates (Cloud Workflows, and Power Scripts) that you can then tweak, or include a helpful editors and testers (Cloud Workflows, JMWE and JWT). But inevitably, you're going to have to get in there and figure it out yourself.
Bottom line:
If you want to use custom workflow validators or conditions on Jira Cloud, you're going to have to learn Jira Expressions.
Examples:
At its simplest, you might need to do something like "Only the Reporter should be able to close a ticket". So that expression would be:
user == issue.reporter
(That's from JMWE's Use Cases.)
Or maybe you need the old "Check for unresolved sub-tasks" condition before you let a user resolve a parent:
issue.subtasks.filter(s => !(s.resolution != null)).length == 0
(That's from JWT's Use Case Library.)
You can even check links:
issue.links
.filter(link => link.type.inward == "is blocked by" ||
link.type.inward == "is mitigated by")
.length > 0
There's a lot you can do with Jira Expressions, and you're going to "get" to learn Boolean logic which is... some kind of fun. But for sure, the best way to learn is by doing. Check those links above, as it's very likely there's an existing "recipe" that can be adapted to your use.
But if you're really stuck, post here in the forums (tags: cloud, jira-cloud, jira-expressions), where some of us apparently have nothing better to do but than to debug others' Jira Expression issue. (Or in some cases like @David Fischer _Appfire_ maybe they get paid for it. :-)
Darryl Lee
Sr. Systems Engineer
Roku, Inc.
San Jose, CA
128 accepted answers
6 comments