Skip to end of banner
Go to start of banner

Default values of system fields on create screen

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 3 Next »

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.

init.sil
lfInstantHook({"issueType", "project"}, "hook.sil");
lfWatch("issueType", {"issueType", "project"}, "hook.sil");
hook.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"});
}

 

 

  • No labels