On this page



Use case

Use case description


Prerequisites

Remove this section, if no prerequisites are needed.


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


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


This expression will add to the number introduced in the screen forĀ Customer Prioritization the index of the issues in the issue list obtained before in every of the issues according to the issue list in the Target issue field.



Conditional execution


%{nnnnn} !=  null


The post function will only be executed if the field has a value.







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




JWT featurelink each symbol to parent page of the function category (e.g. conditions/ validators/automation action...)
Workflow function

Link to the function being used

Parser functionsLinks to all used parser expressions. Enter links separated by a blank space
Labelused to mark a use case as staff pick





Status
Tech review

Style guide