JJUPIN Latest - This documentation describes the plugin usage and configuration.
Download the latest version of the plugin and try it along reading.

Skip to end of metadata
Go to start of metadata

Availability

Icon

This routine is available since 

  1. JJUPIN 2.5
  2. katl-commons 2.5

Syntax

lfSet(field, value, [triggerChange]);

Description

Sets the field with the given values.

This sets the value in the screen only. It does not set the value on the issue (setting it on the issue require direct access to the field)

Parameters

ParameterTypeRequiredDescription
fieldStringYesThe field to set the value for.
value

String

YesThe value to set. It can be a string value or an array with string values.
triggerChangeBooleanNoIf set to true, triggers the change event when lfSet is used on a field. Available since v. 2.5.6 for Jira 5.x and v. 2.6.1 for Jira 6.x.

Examples

The following code example sets the priority standard field as Major.

Warning

Icon

The value will not be saved in the database. To save value in the database you should do something like:

priority = "Major"; // this saves into the database the value

However, please make sure you're not on the create screen!

As we said before, you can set multiple values to a field that can have multiple values. For example, let's set components field to comp1, comp2.

Warning

Icon

You can't set a field if the values are not available for the given field. For example, in order to set components field to comp1, comp2, you have to make sure that comp1 and comp2 are valid components for that issue. 

If you try to set, for example, issue type field using an array like the code below, lfSet will take into account only the first value from the array. So, this will set the issue type to "Task". 

If you want to trigger the change event on the field when using lfSet, you can use the optional triggerChange parameter set to true:

Known Issues

Icon

There are some fields, from the list provided in Supported fields and graphic elements, that couldn’t set the value for. These fields are:

  • Labels, on Edit, Transition, Create screens;
  • Estimate (remaining estimate), on Transition screens;
  • Votes
  • Watchers

On the view screen, when you want to edit a field will be displayed the last value saved for that field.

You can’t set fields that are not editable. For example, on the issue view screen you can’t set  status or resolution fields.