SR4J Sprint 133 (7.03)
Set the Insight Object/s field value using Behaviours setFormValue() doesn't work when a user/customer has not been added to any group, but the Object Schema Users permissions for Jira Service Management Customers are .
1. Create an Insight Object/s field. Configure this Insight field to select the created schema.
2. Associate the Insight Object/s field with the Service Desk projects, e.g. IT Desk project.
3. Create a Behaviour, add Service Desk mapping to the IT Desk project and all request types.
4. Attach the following snippet to the Behaviour Initialiser:
5. Navigate to the IT Desk project and add the Insight Object/s field to the request types.
6. Navigate to the IT Desk portal and login as "admin" user. Select a request type and the request form will show the Insight Object/s field value is set with an object.
7. Navigate to the IT Desk portal, log in as the newly created user, e.g. carmen, then select a request type.
When the Object Schema Users permissions for Jira Service Management Customers are ENABLED, the Behaviour should set the Insight Object/s field value, and the field shows the object "HOS-1" value.
When the Object Schema Users permissions for Jira Service Management Customers are ENABLED, the Behaviour is triggered, but the Insight Object/s field is not set and returns a null value.
1) Tested on Jira 8.20.7, ScriptRunner 6.52.1 (latest version).
2) Attached is a screenshot and a HAR file when login as an "admin" user:
3) Attached is a screenshot and a HAR file when login as a user/customer, e.g. carmen, that is not added to any group:
4) Tested on Jira 8.22.6, ScriptRunner 7.4.0 (current latest version).
The setting of field value only works for the licensed user via server-side script but not initialiser.
Example: 2 Insight Object/s fields named and
Server-side script on :