Hello, Is there any native way how to change imported values? For example we will have single select dropdown in JIRA issue with values
Customer A - E-mail
Customer A - Web
Customer A - Social
Because reports will be intended only for Customer A, then there is no reason to keep it there for purpose of reporting, but other (non imported) projects have also other Customers. Therefore we want to keep it in JIRA like this. Is there any simple chance how to adjust it in EazyBI just into:
E-mail
Web
Social
Or only what I can do is calculated member with with SELECT CASE for each value?
Other use case is for example imported groups. They have specific naming convention in our instance, but that is very unfriendly for Business users.
JIRA have value mapping in CSV importer, so it would be nice to have something like this in EazyBI cube management.
Hi,
for the cases when you wish to rename the field values, the most appropriate solution is the custom Javascript code in the Additional options of the Jira import options.
You should write a short Javascript taking a substring or checking regular expression like this:
This code transforms the customfield_10303 by taking a substring (starting from the character position 3). Now that account will have the custom field value members renamed by the script.
Thank you, this looks promising
How could I apply it for imported user groups (Reported group, assignee group). they usually follow some naming convention, or are loaded from external user directory, so JIRA admin can not rename them. Business users do not understand what those names mean.
Groups are not part of basic API response for single issue. How can I reference it in this Custom script?
The update of the assignee group should work with the script like this:
if (issue.fields.assignee) {
for (i=0;i<issue.fields.assignee.groupNames.length;i++) {
if (issue.fields.assignee.groupNames[i]=="jira-administrators"){
issue.fields.assignee.groupNames[i]="my administrators"
}
}
}
When I am trying to GET information over API like http://localhost:8080/rest/api/2/issue/39000
Then reporter do not contain groupNames array. Do I need to somehow expand it, or it is some different call?
I would like to understand where is the difference, so next time I could review what is in the response and try to work with that without bothering you.
In the case of the eazyBI app for Jira Server, the issue data may have a different structure than provided by standard Jira API. You can check the actual structure of issue data in the import options of eazyBI in the Jira import options screen: