lfSet(field, value, [triggerChange]);
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)
|field||String||Yes||The field to set the value for.|
|Yes||The value to set. It can be a string value or an array with string values.|
|triggerChange||Boolean||No||If 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.|
The following code example sets the priority standard field as Major.
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.
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:
You can’t set fields that are not editable. For example, on the issue view screen you can’t set status or resolution fields.