On this page
Use case
Prerequisites
Create a new global reflexive transition (from any issues to itself) and add it a custom screen that includes the Customer Prioritization field.
Configuration
Target issue*
Select Set target issues manually (parser expression) and add the following expression:
issuesFromJQL("issuekey != " + %{00015} + " and \"Customer Prioritization\" >= " + {nnnnn} + " order by \"Customer Prioritization\" ASC")
This expression will select all of the existing issues whose Customer Prioritization field value is greater than or equal to the existing one excluding the one from the current issue.
Field*
Select the Customer Prioritization field and add the following expression.
{nnnnn} + indexOf(^%{00015}, issuesFromJQL("issuekey != " + %{00015} + " and \"Customer Prioritization\" >= " + {nnnnn} + " order by \"Customer Prioritization\" ASC"))
Conditional execution
%{nnnnn} != null
Target issue*
Select Set target issues manually (parser expression) and add the following expression:
(previousValue({nnnnn}) = null ? issuesFromJQL("issuekey != " + %{00015} + " and \"Customer Prioritization\" >= " + {nnnnn} + " order by \"Customer Prioritization\" ASC") : ({nnnnn} < previousValue({nnnnn}) ? issuesFromJQL("issuekey != " + %{00015} + " and \"Customer Prioritization\" >= " + {nnnnn} + " and \"Customer Prioritization\" <= " + previousValue({nnnnn}) + " order by \"Customer Prioritization\" ASC") : issuesFromJQL("issuekey != " + %{00015} + " and \"Customer Prioritization\" >= " + previousValue({nnnnn}) + " and \"Customer Prioritization\" <= " + {nnnnn} + " order by \"Customer Prioritization\" DESC")))
Field*
Select the Customer Prioritization field and add the following expression.
(previousValue({nnnnn}) = null ? {nnnnn} + indexOf(^%{00015}, issuesFromJQL("issuekey != " + %{00015} + " and \"Customer Prioritization\" >= " + {nnnnn} + " order by \"Customer Prioritization\"")) : ({nnnnn} < previousValue({nnnnn}) ? ^{nnnnn} + 1 : ^{nnnnn} - 1))
Related use cases
If you still have questions, feel free to refer to our support team.