Hello,
I have hierarhy levels of issues connected by inward issue link “is contained in”
[jira.customfield_init]
name = "INIT"
inward_link = "is contained in"
issue_type = "Initiative"
update_from_issue_key = "customfield_change"
dimension = true
[jira.customfield_change]
name = "CHANGE"
inward_link = "is contained in"
issue_type = "Change"
update_from_issue_key = "customfield_cte"
dimension = true
[jira.customfield_cte]
name = "CTE"
inward_link = "is contained in"
issue_type = "CTE"
dimension = true
[[jira.issue_hierarchies]]
name = "Initiative-Change-CTE"
all_member_name = "All Issues by INITIATIVE"
dimension = true
levels = [
{name="INIT",key_column="customfield_init",issue_type="Initiative"},
{name="CHANGE",key_column="customfield_change",issue_type="Change"},
{name="CTE",key_column="customfield_cte",issue_type="CTE"}
]
Report looks like that

My task is to get the status of INIT
I’ve made some tries:
-
I can get INIT key
[Issue].CurrentHierarchyMember.get('INIT')
-
I can get INIT name
[Issue].[Issue].GetMemberNameByKey([Issue].CurrentHierarchyMember.get('INIT'))
-
I can get Status of CTE
[Status].[Status].getMemberNameByKey( [Issue].CurrentHierarchyMember.get('Status ID'))
But how to get the status of INIT, Change?

This is not working
--get Status by INIT key
[Status].[Status].GetMemberByKey(
--get INIT key
([Issue].CurrentHierarchyMember.get('INIT'))
)
@cybertachikoma
Try this formula:
CASE WHEN
Not IsEmpty([Issue].CurrentHierarchyMember.get('INIT'))
THEN
--get Status by INIT key
[Status].[Status].GetMemberByKey(
--get INIT key
(
[Issue].[Issue].Getmemberbykey(
[Issue].CurrentHierarchyMember.get('INIT')
)
).get('Status ID')
).getCaption
END
Martins / eazyBI
Thanks, It works!
Now I have to try to understand how it works.
And why it’s not working for “Change”
CASE WHEN
Not IsEmpty([Issue].CurrentHierarchyMember.get('Change'))
THEN
--get Status by INIT key
[Status].[Status].GetMemberByKey(
--get INIT key
(
[Issue].[Issue].Getmemberbykey(
[Issue].CurrentHierarchyMember.get('Change')
)
).get('Status ID')
).getCaption
END
@cybertachikoma
From your screenshots earlier in the thread it seems that the correct name for the field is UPPERCASE.
Property names in eazyBI are case sensitive.
Try this formula for “Change”
CASE WHEN
Not IsEmpty([Issue].CurrentHierarchyMember.get('CHANGE')) -- if change is imported for the main issue
THEN
--get Status by Change key
[Status].[Status].GetMemberByKey( --searching in Status dimension for status member
--get Change key
(
[Issue].[Issue].Getmemberbykey( --searching for the issue which corresponds the Change issue key
[Issue].CurrentHierarchyMember.get('CHANGE') -- using the change for the main issue
)
).get('Status ID') --returns the Status ID integer for the change issue key
).getCaption --returns the name from the found Status member
END
Martins / eazyBI
1 Like
Thanks, a lot.
Your detailed examples helped me to understand how to move up/down in hierarchy and object properties.
So I’ve found that yes - CHANGE is in upper case.
But your intuition is great 
--get Change hardcoded
[Issue].[Issue].Getmemberbykey(
"T10_CLTCOM-169"
).AllProperties
Thank you a lot.
I’ll leave this description here mostly for myself, and may be somebody.
--get Change from Hierarchy
[Status].[Status].GetMemberByKey(
(
[Issue].[Issue].Getmemberbykey(
[Issue].CurrentHierarchyMember.Get('CHANGE')
)
).get('Status ID')
).getCaption
--get Change hardcoded
/*
[Issue].[Issue].Getmemberbykey(
"T10_CLTCOM-169"
).AllProperties
*/
--get key
--[Issue].CurrentHierarchyMember.get('INIT')
--get object
/*
[Issue].[Issue].Getmemberbykey(
[Issue].CurrentHierarchyMember.get('INIT')
).AllProperties
*/
--get status ID
/*
(
[Issue].[Issue].Getmemberbykey(
[Issue].CurrentHierarchyMember.get('INIT')
)
).get('Status ID')
*/
--get status name
--[Status].[Status].GetMemberByKey(1).getCaption
1 Like