Details
-
Bug
-
Status: Done
-
Critical
-
Resolution: Done
-
5.5.6, 5.6.1, 5.6.2.1-jira8, 5.6.7.1-jira8
-
None
-
SR4J Sprint 77
-
6.6
Description
Steps to reproduce
The problem is occurring in the Behaviour service desk.
1) Use the Use Service Desk mapping for the behaviour as shown below
2) Add the sample code below to the Behaviour initialiser
def epic = getFieldByName("Epic of Change") epic.setReadOnly(true) epic.setFormValue(null) getFieldByName("Change").convertToSingleSelect([ ajaxOptions: [ url : getBaseUrl() + "/rest/scriptrunner-jira/latest/issue/picker", query: true, data: [ currentJql : "project = TEST ORDER BY key ASC", label : "Pick high priority issue in Support project", showSubTasks : false, ], formatResponse: "issue" ], css: "max-width: 500px; width: 500px", ])
3) And the sample code below Behaviour server side code:-
def change = getFieldById(getFieldChanged()) def epic = getFieldByName("Epic of Change") if(getFieldById(getFieldChanged())) { epic.setFormValue(null) epic.setReadOnly(true) } if(change) { epic.setReadOnly(false) epic.convertToSingleSelect( [ ajaxOptions: [ url : getBaseUrl() + "/rest/scriptrunner-jira/latest/issue/picker", query : true, data : [ currentJql: "project = TEST AND issueFunction in hasLinks('is caused by')", label : "Select the epic for the change", ], formatResponse: "issue" ], css : "max-width: 500px; width: 500px", ] ) } else { epic.convertToShortText() epic.setFormValue(null) epic.setReadOnly(true) }
Current Behaviour on Service Desk
Multiple select options start to appear
Expected Behaviour of Service Desk
There should only be one select option which appears. And the number of select options should not increment.
Additional Notes
This problem currently only occurs using the Service Desk Mapping. Using the project/issuetype mapping for the behaviour as shown below
works fine
Below is a video of my test for the service desk customer view.