Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Info
titleRequired apps

Power Scripts™ for Jira 2.5.2+ (server)

Level: BASIC

Problem

We want to forbid some issue priorities for certain projects during the issues creation, edit or project workflows transitions screens.

For example, we want to remove issue priorities `Blocker` and `Trivial` from the list of the available  options in the currently configured project.

Solution

...

Problem

If you need to hide specific priority types like Blocker and Trivial when working on new issues or modifying existing ones, or during project workflow transitions, here's a solution.

Solution

To achieve this, use the lfRestrictSelectOptions SIL™ routine.

Create the script below and link it with the primary Live Fields configuration on your project

...

(as

...

explained here). This

...

ensures that issue priorities

...

are hidden on the Create, Edit, and Transition workflows screens.

restrict_priorities.sil
Code Block
string[] forbiddenPriorities = {"Blocker", "Trivial"}; //the array of the priorities to restrict
lfRestrictSelectOptions("priority", forbiddenPriorities);
Note

...

When using the lfRestrictSelectOptions routine, make sure to use quotes for the parameters you provide (for example, "priority")

...

. This way, the field label name for the current screen is accurately passed.

...

Otherwise, SIL™

...

...

retrieves the priority from the current issue.

...

Table of Contents