Details
-
Type:
New Feature
-
Status: Done
-
Priority:
High
-
Resolution: Done
-
Affects Version/s: 5.2.1, 5.4.0
-
Fix Version/s: 5.4.27
-
Component/s: Behaviours
-
Labels:
-
Environment:
JIRA 7.9.0
SR 5.4.2/5.4.0
-
Sprint:Sprint 37 - Ends Nov 28
-
Critical Points:0.7
Description
While it is possible to set the value of the comment security level with a script like
def formField = getFieldById("commentLevel") formField.setFormValue("role:10011")
...you can't use setFieldOptions to restrict which roles are in the list.
//This does not work def formField = getFieldById("commentLevel") formField.setFieldOptions(["role": "10070"])
If you do, the browser console displays an error like this:
Uncaught TypeError: Cannot read property 'match' of undefined at String.<anonymous> (batch.js:23222) at Function.each (batch.js:57) at Object.syncOptions (batch.js:23216) at setFieldOptions (batch.js:20086) at addFieldListeners (batch.js:20286) at Object.success (batch.js:20593) at j (batch.js:63) at Object.fireWith [as resolveWith] (batch.js:64) at d (batch.js:189) at XMLHttpRequest.b (batch.js:201)
While this is currently the expected behaviour (only certain types are supported by setFieldOptions), it'd be nice to have this.
Attachments
Issue Links
- duplicates
-
SRJIRA-2687 behaviours for service desk - can't do operations on selects/multiselects
-
- Done
-
- is related to
-
SRJIRA-2667 JSD Behaviours do not work with Select List Conversions
-
- Done
-