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,439
Community Members
 
Community Events
184
Community Groups

Jira Expressions - But Why?

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.

giphy

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


Even more examples

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

6 comments

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 16, 2021

Nice summary, @Darryl Lee !

David

P.S. I actually don't get paid for helping, but as the creator of JMWE and JMCF, I do care about users making the most of the apps...

Like # people like this
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.
May 16, 2021

@David Fischer _Appfire_ yes, I meant that tongue-in-cheek since I know JMWE is your baby. :-}

Like Dave Liao likes this
Matt Doar__ LinkedIn
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2021

Thanks for pointing this out. 

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2021

Very cool and comprehensive write-up, @Darryl Lee! And I feel you, you will have to learn it because there's no way around it. I struggle with it myself, but luckily there is help. 😁

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 13, 2021

Thangs for sharing. One thing to note about Cloud here - you can install the Workflow plugin and achieve a lot of capabilities in your workflow. App key - com.atlassian.jira.plugin.system.workflow

Like # people like this

Very nice, thanks for sharing

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events