Date Comparison Grid

Hi,
Date Comparison Grid.

I’m trying to make a date comparison table between months, basically I have to compare the DAY x the MES:
On the 1st of the month 01 has a metric = 5
On the 1st of the month 02 there is another Metric = 7
For the management to make the comparison.

An explanation is attached:

Hi @DEGAN ,
You can explore JavaScript custom dimension and adjust code that is used here to get “Hours of the Day”:

The JavaScript code would be like this:

[jira.customfield_day_of_month_created]
name = "Day of Month Created"
data_type = "integer"
dimension = true
javascript_code = '''
var DaysCreated = new Date(Date.parse(issue.fields.created)).getDate();
issue.fields.customfield_day_of_month_created = DaysCreated;'''

In the report it looks like this:

But keep in mind that with this approach you can get only a particular event - in this case when the issue was created and it won’t be linked to other measures in your account.

To see data for the previous month you can also explore standard calculations → time ago Create reports

best,
Gerda // support@eazyBI.com

hank you very much for the feedback,

It helped me a lot, now I’m just trying to change the metric from created to resolved, but it’s giving an error, thank you very much anyway.
Here’s the model I’m using for resolved:

[jira.customfield_day_of_month_resolved]
name = “Day of Month resolved”
data_type = “integer”
dimension = true
javascript_code = ‘’’
var Daysresolved = new Date(Date.parse(issue.fields.resolved)).getDate();
issue.fields.customfield_day_of_month_resolved = Daysresolved;’’’

Hi @DEGAN ,
You are close to the solution, but you need to use ‘issue.fields.resolutiondate’:

[jira.customfield_day_of_month_resolved]
name = "Day of Month Resolved"
data_type = "integer"
dimension = true
javascript_code = '''
var DaysResolved= new Date(Date.parse(issue.fields.resolutiondate)).getDate();
issue.fields.customfield_day_of_month_resolved = DaysResolved;
'''

To see available issue fields, you can check JSON in eazyBI import options:

Also, see in eazyBI documentation other tips on how to test your JavaScript customfield: JavaScript calculated custom fields - eazyBI for Jira

best,
Gerda // support@eazyBI.com

Hi,

Thank you very much for the feedback, it helped me a lot.

Thank you so.

1 Like