You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

On this page

Use case

Prerequisites


Set up workflow validator
Create a custom Number Field called Customer Prioritization and add it to the Create/View/Edit screens,

Create a new global reflexive transition (from any issues to itself) and add it a custom screen that includes the Customer Prioritization field.


Configuration


Add an Update or copy field values post function to the Create transition in the second position.

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")


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



Add an Update or copy field values post function to global reflexive transition previously created.

Add an Update or copy field values post function to global reflexive transition previously created.

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.