Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleRequired plugins

You will need the following JIRA plugin:

JJupin v2.5.3 and above

Level: BASIC

The following problem can be solved by Live Fields, included in the JJupin plugin. Please also read the documentation regarding accessing the current screen with live fields.

Problem

The To provide 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 specific 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.

First set up your Live Fields to watch for issueType & project

Code Block
titleinit.sil
lfInstantHook({"issueType", "project"}, "hook.sil");
lfWatch("issueType", {"issueType", "project"}, "hook.sil");

 

On our hook, we react to the event by setting the fields to what we wish for:

Code Block
titlehook.sil
if(argv["screen"] == "create" && argv["project"] == "DEMO" && argv["issueType"] == "Bug") {
   //on Create Issue screen
	lfSet("description", "WhatPlease describe what's Happeninghappening: \n\n" +
                         "What you think Shouldshould be Happeninghappening: \n" +
                         "Where it's Foundfound: \n" + 
                         "Steps to Reproducereproduce: \n#action 1\n#action 2\n#action3");
    lfSet("components", {"jjupinui", "dbcfbusiness"});
    lfSet("affectedVersions", {"1.0.1", "1.0.2"});
}

 That's all.