Counting issues transitioned from specific assignees to another one

Hi,
I would like to calculate how many issues per month were transitioned from Assignees XYZ to Assignee A.

Since both transition to assignee and transition from assignee are measures, I can’t make a tuple out of it.
I would need an equivalent dimension to Transition, but for assignee rather than status.

I built this query

(
Case when
([Measures].[Transitions from issues count]
,[Transition Field].[Assignee],
[Assignee].[Vetter])>0
then
([Measures].[Transitions to issues count]
,[Transition Field].[Assignee]
,[Assignee].[Holding])
end)

The 1st part of the case when limits issues considered to those that were at some point assigned to the vetters (calculated member aggregating 6 assignee)

The second part (then) counts issues that were transitioned to the Holding assignee amongst those that have been assigned to a vetters.

The problem is that I need to count only issues that were transitioned from vetters to holding, so I think I need a time filter as well… something that would say
”issues was assigned to vetter AT THE TIME it was transitioned to Holding”

Any ideas on how I can do this?

Thanks you!

Hi @Marilou

You are right. With standard tuple calculations, it is not possible to calculate issues by specific assignee transitions due to the way assignee changes are stored in the eazyBI db.

Here, the workaround can be two new global calculated fields: one of them would be a dimension which will get values from the issue changelog, and the other - a new measure that you can use with new dimension to count issues with assignee change.

Determining new global calcualted fields from eazyBI advanced settings requires Jira system admin rights.

You can use this code in advanced settings:


[jira.customfield_as_trans]
name = "Assignee transition"
data_type="string"
dimension=true
separate_table=true

[jira.customfield_as_chcnt]
name="Assignee change count"
data_type="integer"
measure=true
multiple_dimensions=["Assignee transition","Time"]
javascript_code='''
var result=[];
for (hist of issue.changelog.histories) {
  for (item of hist.items){
    if (item.field=="assignee") {
        result.push((item.fromString?item.fromString:"") + " => " 
                     + (item.toString?item.toString:"") + ","
                     +   hist.created.substr(0,10) + ",1"
                     );
    }
  }
}
return result.join("\n");
'''

After that make sure you import Assignee transition with dimension checkbox and “Assignee change count” with measure checkbox from the eazyBI import options page

Next you can use the new measure with new dimension to count changes by specific assignee change.

eazyBI support / Martins

1 Like

Hi Martins,

thank you for your script, I’ve sent a request to my Jira admin to add it!

Meanwhile, I made this query (With the help of eazybi AI) that seems accurate, but it’s so complex I can’t add all I need before it stops loading.:melting_face:

Count(
Filter(
DescendantsSet([Issue].CurrentHierarchyMember, [Issue].[Issue]),
– Check if issue has transitions to triagebucket
([Assignee].[triagebucket], [Measures].[Transitions to assignee]) > 0
AND
– Check if issue has transitions from one of the specific assignees
Sum(
{
[Assignee].[Person1],
[Assignee].[Person2],
[Assignee].[Person3],
[Assignee].[Person4],
[Assignee].[Person5],
[Assignee].[Person6]
},
[Measures].[Transitions from assignee]
) > 0
)
)

@Marilou

Please export and share the definition of the report where you try adding this calculated measure.

I believe it can be optimized to make it calculate results faster.

Martins / eazyBI