Issue Summary
Object searching in A4J is only possible with the Name attribute. In the case where an object type has no "Name" attribute but the label attribute is any other text attribute, it's not possible to find and select the desired objects from the drop-down list in A4J.
This is reproducible on Data Center: yes
Steps to Reproduce
- Create an Assets IT Service Management project with sample data.
- Go to the schema created from the project above and go to the Attributes tab of the Business Services object type.
- Rename the "Name" attribute to "Services".
- Go to System > Automation rules, create a new rule.
- Select any trigger, for example Issue created.
- Select New action > Edit issue.
- Select Affected Business Service as the field to be edited.
- In the next field, start typing Billing Service.
Expected Results
The object with the label "Billing Service" is showing in the dropdown, available to be selected
Actual Results
No object is available. In the Developer Tools > Network tab, we can see that the Insight find objects REST API call is used for the object searching (and the search is with every existing object type as per JIRAAUTOSERVER-504). This means the search was done with an AQL like Name like billing, and since the name "Billing Service" is not a value of the "Name" attribute anymore, no object is shown.
Workaround
- Revert the change of the attribute renaming or create the "Name" attribute again and populate it with the desired values.
- Alternatively, we can specify the Assets custom fields and objects to be assigned in JSON format as per Advanced field editing using JSON. Here's an example JSON text of setting an object (ITSMITSM-465) to an Assets custom field (customfield_10204).
{ "fields": { "customfield_10204": [{"key" : "ITSMITSM-465"}] } }
Suggestion
- Allow the search to be done with other attributes like the label attribute or "anyAttribute"
- is duplicated by
-
JIRAAUTOSERVER-1052 A4J always searches objects by "Name" attribute in Edit Issue action for Assets Custom fields
- Waiting for Release