Versions Compared

Key

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

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 Priority options in the currently configured project.

Solution

By using lfRestrictSelectOptions SIL™ routine we'll easily manage to hide some issue priorities for certain projects. All you have to do is to create the following script and associate it with the main 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 described explained here). This way, the ensures that issue priorities will be hidden in create/edit/workflow transitions 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
Pay attention to the parameters passed in lfRestrictSelectOptions routine. You have

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

, in order to pass in the actual

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

Otherwise, SIL™

Interpreter will actually get

retrieves the priority from the current issue.

Table of Contents