Details
-
Bug
-
Status: To Do
-
High
-
Resolution: Unresolved
-
7.3.0
-
None
-
2.3
Description
Using the @GroupPicker annotation with the "multiple" option set to true returns a list of null values.
Note: This bug is specific to Behaviours and parameters with multiple values - the script below will work in all other contexts (assuming you don't use Behaviour specific methods like getFieldById() or setFormValue()).
Steps to Reproduce
- Create a new Behaviour Initialiser script using the sample code below:
import com.atlassian.crowd.embedded.api.Group import com.onresolve.scriptrunner.parameters.annotation.GroupPicker @GroupPicker(label = 'Sample Group', description = '', multiple = true) List<Group> groups getFieldById("summary").setFormValue(groups.toString())
- Once the method is added to the initialiser, a picker should appear as shown in the image below:-
- Save the Behaviour
- Create a new Issue for the project that the Behaviour has been mapped to.
Expected Behaviour
The groups that have been selected from the picker should be displayed in the Summary field.
Actual Behaviour
Selecting a group when configuring the Behaviour will result in the Summary field being set to something like: [null, null, null, null, null, null, null, null, null] when the Behaviour runs on an issue:
Attachments
Issue Links
- duplicates
-
SRJIRA-6452 Dynamic forms parameters with multiple values do not work correctly in behaviour scripts
-
- Done
-