Versions Compared

Key

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

Problem

The default values for fields in the create screen, can be changed by the user.

Solution

Here is how you can set the default values on create screen for a specifc project:.

Let's consider we have a rule, by setting the description, components and affectedVersions on the create issue screen . This allows the reporter  to set some fields when the issue is created.

Code Block
titleinit.sil
lfInstantHook({"issueType", "project"}, "hook.sil");
lfWatch("issueType", {"issueType", "project"}, "hook.sil");
Code Block
titlehook.sil
if(argv["screen"] == "create" && argv["project"] == "DEMO" && argv["issueType"] == "Bug") {
   //on Create Issue screen
	lfSet("description", "What's Happening: \n" +
                         "What Should be Happening: \n" +
                         "Where it's Found: \n" + 
                         "Steps to Reproduce: ");
    lfSet("components", {"jjupin", "dbcf"});
    lfSet("affectedVersions", {"1.0.1", "1.0.2"});
}