Details
-
Type:
Bug
-
Status: Done
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 5.4.45, 5.4.47
-
Fix Version/s: None
-
Component/s: Behaviours, Third-Party Apps
-
Critical Points:0.6
Description
MS Edge version 42.17134.1.0 on windows 10 does not allow values of the CRM Plugin's "CRM Company" select list field to be set from a behaviour.
To Re-create problem:
Use this Script:
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.issue.MutableIssue import com.onresolve.jira.groovy.user.FieldBehaviours import groovy.transform.BaseScript import org.apache.log4j.Logger import org.apache.log4j.Level @BaseScript FieldBehaviours fieldBehaviours def log = Logger.getLogger(getClass()) log.setLevel(Level.DEBUG) def copyCustomerValue(MutableIssue contextIssue, String fieldId) { def field = customFieldManager.getCustomFieldObject(fieldId) def fieldValue = contextIssue.getCustomFieldValue(field).toString() def fieldConfig = field.getRelevantConfig(getIssueContext()) def options = ComponentAccessor.optionsManager.getOptions(fieldConfig) getFieldById(fieldId).setFieldOptions(options.findAll {it.value in [fieldValue]}) } if (getBehaviourContextId() == "OP-attach-proposal") { IssueManager issueManager = ComponentAccessor.getIssueManager() MutableIssue contextIssue = issueManager.getIssueObject(getContextIssueId()) copyCustomerValue(contextIssue, "customfield_10500") } /* customfield_10500 is the CRM Company field. */
- Install the CRM for Jira plugin "CRM for JIRA - Customers and Sales"
- On an issue that already exists add a customer to the CRM Company field. Then setup a "Create Constrained Issue" and make sure it has the key "OP-attach-proposal". Make sure this "create constrained issue" link is clickable from the issue you added the CRM Company field value to.
- Apply this script as a behaviour initializer but update the field id to the CRM Company field id on your installation
- Click the "Create Constrained Issue" Link you created in chrome and the copy method should work and the CRM Company field should have the same value as the issue where the "Create Constrained Issue" link was clicked from.
- Click the "Create Constrained Issue" Link you created in Edge and the copy method should Fail and the CRM Company field will be blank and have no options defined
No errors appear to be dropped to the logs or the console to indicate why this fails in Edge only.