I only want certain issues to be created on EVEN weeks of the year. I have a field called "Week Number" that is populated on the parent issue. So I only want the issue to be created if the number in that field is even. If it is odd, I want the expression to return false. Is there a condition, or perhaps an expression, that I could write to accomplish this?
Hi @Nick Burgess ,
There absolutely is, and it's pretty easy with Jira Expressions.
If you do not have one already, you will need an app that allows you to use custom Jira Expressions as workflow conditions if you want to set this up in a workflow. In my biased opinion Cloud Workflows is a terrific option, but there are other apps available in the marketplace, too.
Anyway, without further ado, let's get to the expression. Assuming that your "Week Number" field's id is 123456, this expression will return true whenever there is an even value in "Week Number"
(issue.customfield_123456 % 2) == 0
The trick here is the modulo operator % => it returns the remainder of dividing the value from your field by 2. Which is 0 for even numbers, job done.
Hope that helps,
Oliver
Full disclosure: I work for Jodocus, the Vendor who created Cloud Workflows. Let me know if you need any help getting started, I'm happy to help!
Thank you, my company uses JMWE, but I was able to accomplish what I needed with your expression!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.