Versions Compared

Key

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

Problem

We You want to restrict the limit sub-tasks according to the issue typesbased on issue type. For example, if issue type is New Feature or Improvement, we want to remove from the list of available sub-tasks the following one: Sub-task (we'll allow only other types of subtasks, never the standard one)

Solution

By using lfRestrictSelectOptions SIL™ routine we'll easily manage to hide some sub-task issue types for certain projects. All you have to do is to create the following script and associate it with the main Live Fields configuration on your project, as described on the Live Fields page.

restrict_subtask.sil
Code Block
//Note: you may need to check for the screen (or put the conditions we run over with)
if(argv["screen"] == "create-subtask") { //only on that screen
  string[] issueTypes = {"New Feature", "Improvement"}; //the array of the Issue Types 
  string[] subTasks = {"Sub-task"}; //the array of the Sub-Tasks to restrict
  if(elementExists(issueTypes, issueType)) {
      lfRestrictSelectOptions("issueType", subTasks);
  }
} 

That's it.

Table of Contents