Skip to end of banner
Go to start of banner

Restrict sub-tasks based on Issue Type

Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 7 Next »

Problem

We want to restrict the sub-tasks according to the issue types. 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
//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.

  • No labels