Eazy Bi migration from zendesk and relaible date

Hi ,
im working on a project and i have tickets that been imported from zenedesk to jira.
the problem starts where the creation date is the migration date and not the real data the real creation date is stored in a custom field called created from zen desk . so I succeded making the right calculation for created vs solved by time with this mdx : ( the logic is to count issues by if custom field is empty or not) . CASE
WHEN [Time].CurrentHierarchyMember IS [Time].CurrentHierarchy.DefaultMember
THEN
– When no time filter is applied, use the native measure
[Measures].[Issues created]
ELSE
– When time filter is applied, use a custom approach
Sum(
– Only consider issues that exist in the current context (respects page filters)
Filter(
[Issue].[Issue].Members,
([Measures].[Issues created],
[Time].CurrentHierarchy.DefaultMember) > 0
),
– For each issue, check if it belongs in the selected time period
CASE
WHEN IsEmpty([Issue].CurrentHierarchyMember.Get(‘Created in Zendesk’))
THEN
– If no Zendesk date, use native created date
CASE
WHEN DateInPeriod(
[Issue].CurrentHierarchyMember.Get(‘Created at’),
[Time].CurrentHierarchyMember
)
THEN 1
ELSE 0
END
ELSE
– If Zendesk date exists, use that
CASE
WHEN DateInPeriod(
[Issue].CurrentHierarchyMember.Get(‘Created in Zendesk’),
[Time].CurrentHierarchyMember
)
THEN 1
ELSE 0
END
END
)
END

but now I have other reporters I need to calculate by the “real data” - like for instance I need a calculation for sla breached by team customer and time ext (as filters) and the dimension is issue . also other kind of reports → like satisfaction and ext the problem is the time filter. i would very much like to hear if someone got any insights for this kind of problem or MDX solution
thanks.

Hi @noa1483

I believe the best approach is using custom Javascript code for eazyBI import options to override the createddate field for issues imported from Zendesk.

try this code where you have to replace NNNNN with the datetime picker custom field “Created in Zendesk”

if (issue.fields.customfield_NNNNN) {
  issue.fields.created = issue.fields.customfield_NNNNN;
}

That should fix also other default measures, not just “Issues created”
Then you don’t have to use this complex calculation to count issues by created dates in Time periods, you can simply use “Issues created”

Martins / eazyBI

hi thanks for the fast respond it looks like a good solution
, I also need it for resolution dates Is there a way?
its the field- close-zendesk date that needs to be populated to resolution.
thanks noa

Hi @noa1483
The approach is similar

This would be the code to put value from date picker field MMMM into resolution for eazyBI reporting.

if (issue.fields.customfield_MMMMM) {
  issue.fields.resolutiondate = issue.fields.customfield_MMMMM;
}

FYI, you can add a new code below the previous code if you want to run them together in eazyBI import options.

Martins