All eazyBI for Jira eazyBI for Confluence Private eazyBI

Created year
eazyBI for Jira

The calculated field can be used to return the year from the Jira issue created date. This field can be imported as property and dimension. You can use the dimension to group years for the report if you want to filter all report measures by the created date of an issue and calculate results for issues iss created in specific years (to exclude all issues in particular report)

Account-specific calculated field

Account-specific calculated fields are defined in Source Data → Import options.

Settings for the new field

Internal name

cf_cr_year

Display nameCreated year
Data type

string 

Dimension

Custom JavaScript code:

var crd = issue.fields.created;
var year_c = new Date(Date.parse(crd)).getFullYear();
return year_c;

Global calculated field

Global calculated fields are defined in eazyBI advanced settings.

Here are the settings for the new field definitions. You should insert the JavaScript (the code given above) below the line // Insert here the Custom JavaScript codeKeep the opening and closing quotation marks. ''', do not delete them.

[jira.customfield_cf_cr_year]
name = "Created year"
data_type = "string"
dimension = true
javascript_code = '''
  // Insert here the Custom JavaScript code
'''