Track status change

I have a custom field in Jira which can have two states (Yes or No). In a report I want to have the current status of the field and the previous status and then create a new measure that indicates if the status has stayed the same or changed in a certain period (quarter).

Hi @TiLu,

​You might add a few settings to import the change history for the custom field.
​Please read more about that here - Import issue change history.

If you import the field as an issue property, that will allow retrieving the value from issue properties.
​Otherwise, you might find the relevant value by filtering the dimension members with the following expression.
​The below expression checks if the issue is relevant to the report context, including the Time dimension, and then retrieves the name of the relevant State.

​CASE WHEN
​[Measures].[Issues history]>0
​THEN
Generate(
​​ Filter(
​  [Custom state].[Custom state].Members,
  [Measures].[Issues history] >0​
​ ),
​[Custom state].CurrentMember.Name,
​",")
END​

There are two ways to consider if the status has changed since the previous period. ​You might see if the status has changed by looking up status at the end of the previous period and now, or you might check if the issue has had any transitions to or from status.

​The expression for the second version is as follows.

CASE WHEN
([Measures].[Transitions from],
 [Transition Field].[Custom state],
 [Custom state].DefaultMember) >0
THEN
 "changed"
 ELSE
 "remained"
END


​This code could be partially re-used to retrieve the previous status.

CASE WHEN
([Measures].[Transitions from],
 [Transition Field].[Custom state],
 [Custom state].DefaultMember) >0
THEN
 Head(Order(
  [Custom state].[Custom state].Members,
 ([Transition Field].[Custom state],   
  [Measures].[Transition from last timestamp]),
 DESC),1).item(0).Name
END

​Regards,
​Oskars / support@eazyBI.com