our app has a feature that allows the user to update Jira issue fields, in some cases in bulk. We hoped to reduce the number of requests to Jira by utilizing some bulk update method. It looks like Jira expressions could provide a way to do just that, like with issue properties.
Hi What is the best way to check a value is in a list?
match issue.status.name.match(‘^(Closed|Rejected)$’) != null
or an includes
[‘Closed’, ‘Rejected’].includes(issue.status.name)
Both will work fine, so it’s a matter of personal preference.
To me, the version with includes is cleaner. It’s easier to use if the list of values isn’t hard-coded in the expression, but loaded dynamically. And it can be modified to just return false if any of the variables along the way is null:
Hi! I am a bit new to using JIRA Expressions but would it be possible to use this so that a custom field only becomes mandatory if another field, the checkbox is clicked and is “Yes”?
So essentially we have a “Field required validator” on field B, add an error message but also have a Conditional validation based on what was picked in field A?