Hi. I use JIRA Cloud. I have JMWE extension. I want to do the following:
Fields: 1. priority 2. severity 3. Urgency
When priority = high and severity = major then urgency = P1
OR
priority = urgent and severity = critical then urgency = P1
OR
priority = low and severity = trivial then urgency = P3
I don't know how to write the condition
I assume you want to calculate the Urgency field during issue creation, right? In that case, you need to add a Set Field Value post-function to the Create transition of your workflow, to set the "Urgency" field.
You did not mention what should happen if none of the three conditions are met (e.g. priority = high and severity = trivial). I'll assume everything is P3 unless it's P1.
You can use a template like this:
{% if issue.fields.priority.name == "High" and issue.fields.severity.value == "Major" %}
P1
{% elif issue.fields.priority.name == "Urgent" and issue.fields.severity.value == "Critical" %}
P1
{% else %}
P3
{% endif %}
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.