We have a custom field called Current Environment which has a predetermined list of values. I'd like to create a workflow condition that allows the issue to be transitioned if that field is empty. Is this possible?
Hi @Andrew Crawley,
Welcome to Atlassian Community!
Yes, this is possible. You can use the Value field condition to check if the field in question is empty.
@Mikael Sandberg Oh ok I don't see the custom field listed in the dropdown of fields when creating the condition using the Value Field Condition. Do I need to change a setting or configuration in order to get it to appear in the list?
My bad, I was looking at the validator instead of the conditions. The value field condition only works for system fields, so you would need an app like JSU Automation Suite for Jira Workflows or Scriptrunner in order to do it. I have used both in the past and they are both really good apps.
Another solution if you do not want to use an app would be to use automation and either set a label or component, you could then check if one of these fields have the value that would allow the transition. Another option is to use a hidden number custom field that is set by automation and use the compare number custom field condition.
Hi @Andrew Crawley ,
As @Mikael Sandberg suggested, the easiest option will be to use a workflow app that includes custom conditions. In my biased opinion Cloud Workflows is a great option, as it supports Jira Expressions as workflow conditions. There are, of course, other apps available.
Still, no matter what app you pick, you'll most likely end up building a condition based on Jira Expressions, so here's what things are going to look like. Let's say your custom field Current Environment has the id 12345, you could use an expression like this to make sure it's not set to Staging or Development:
issue.customfield_12345 != "Staging" && issue.customfield_12345 != "Development"
Jira Expressions are a fantastic way to build both, conditions and validators, and I cannot recommend them enough, even though they do take a bit of getting used to.
Hope that helps, Oliver
Full disclosure: I work for the vendor who created Cloud Workflows. Let me know if you need any help getting started with this or Jira Expressions in general.
It looks like you're new here. Sign in or register to get started.