Details
-
Bug
-
Status: Done
-
Low
-
Resolution: Won't Fix
-
6.50.0
-
None
-
SR4J Sprint 133 (7.03), SR4J Sprint 145 (8.1.0), SR4J Sprint 146 (8.2.0), SR4J Sprint 147 (8.3.0)
-
10.8
Description
Summary
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 ENABLED.
Steps to Reproduce
Insight - Asset Management
- Install Insight - Asset Management
- Create an Object Schema
- Create some objects in the created Object Schema
- Configure that created Object Schema, select the "Roles" tab, and enable the Object Schema Users permissions for Jira Service Management Customers:
This configuration automatically grants all Jira Service Desk customers permission to view (but not edit or modify) objects in an object schema.
User Management
Create a new user, e.g. carmen, untick the following on the Application access section:
- Jira Service Management (includes Jira Core)
- Jira Software (includes Jira Core)
- Jira Core
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:
//Change the "Insight Objects" to your Insight Object/s field name and "HOS-1" to the object keys getFieldByName("Insight Objects").setFormValue("HOS-1")
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.
Expected Behaviour
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.
Actual Behaviour
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.
Additional Info
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:
userWithPermission.har
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:
userWithoutPermission.har
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 Field A and Field B
Server-side script on Field A:
def insightObjA = getFieldById(getFieldChanged()) def insightObjB = getFieldById("customfield_XXXXX") if (insightObjA.value == "ABC-1") { insightObjB.setFormValue("ABC-4") }
Attachments
Issue Links
- is related to
-
SRJIRA-6699 Making behaviour works on insight field even the current user has no access to the object schema
-
- Done
-