Hi,
Query1:
I tried the code suggested earlier for a grid data to be imported in eazy bi report.
[jira.customfield_tbl_site]
name = "Tbl site"
dimension = true
data_type = "string"
multiple_values = true
split_by = ","
javascript_code = '''
getDocument("/rest/idalko-igrid/1.0/grid/11490/issue/" + issue.id, {ignoreErrors: [404,400]},
function(result){
resultArray = [];
if (result && result.values) {
result.values.forEach(function(valuesItem){
resultArray.push(
valuesItem.isite
);
})
}
issue.fields.customfield_tbl_site = resultArray.toString();
});
'''
But this is not working. Please let me know what changes need to be made.
I have placed a screenshot of the way isite is defined.
Query2:
For grid column with data type as interger/number i m not able to import the column even though i mention measure as true:
One such code is below:
[jira.customfield_DAO]
name = "Tbl DAO"
data_type = "integer"
measure = true
multiple_values = true
split_by = ","
javascript_code = '''
getDocument("/rest/idalko-igrid/1.0/grid/11075/issue/" + issue.id, {ignoreErrors: [404,400,406]},
function(result){
resultArray = [];
if (result && result.values) {
result.values.forEach(function(valuesItem){
resultArray.push(
valuesItem.idao
);
})
}
});
'''
Please let me know how i can changes this code to make it work.
Thanks in advance
Devashree
Hi @devashree ma ,
It looks that your first query is correct, could you please check that in your eazyBI account Data Source -> Customfield tab you have selected your customfield "Tbl site" for the import?
(see more information about JavaScript customfields here - https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields )
For the second query, if you want it to be measure, then it is not correct to use those lines as for measures you can't have multiple values and split them with ",":
multiple_values = true
split_by = ","
As well it seems there is no line for returning the result.
if you still have questions about this, please send a reference to this conversation and additional questions to support@eazybi.com (best together with PrintScreen and JS codes)
best,
Gerda // support@eazybi.com
Hi Gerda,
I tried removing ,
multiple_values = true
split_by = ","
but still , i m not able to get the data in the report.
And what is the syntax for returning the result.
Thanks,
Devashree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @devashree ma ,
Can you confirm that after adding this JavaScript in eazyBI advanced settings you have selected this field in data import?
If that is done and there are still problems, it would be better if you could please send a reference to this conversation and additional questions to support@eazybi.com (best together with PrintScreen and JS codes) as this is not the integration that eazyBI supports by default and some more information is needed.
best,
Gerda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gerda,
Query1:
I tried the code suggested earlier for a grid data to be imported in eazy bi report.
[jira.customfield_tbl_site]
name = "Tbl site"
dimension = true
data_type = "string"
multiple_values = true
split_by = ","
javascript_code = '''
getDocument("/rest/idalko-igrid/1.0/grid/11490/issue/" + issue.id, {ignoreErrors: [404,400]},
function(result){
resultArray = [];
if (result && result.values) {
result.values.forEach(function(valuesItem){
resultArray.push(
valuesItem.isite
);
})
}
issue.fields.customfield_tbl_site = resultArray.toString();
});
'''
In this , the configuration for this grid data in jira shows that site is of type list.
col.isite=Site
col.isite.type=list
col.isite.query=SELECT DISTINCT GOQFactory as isite, GOQFactoryID as id FROM qim.RLOBGOQFactory WHERE GOQFactory IS NOT NULL AND IsActive = 1 AND IsDeleted = 0
col.isite.query.ds = C*****DB
#col.isite.required = true
#col.isite.required=true
col.isite.width=150
How do i change to code if the type is list?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.