Page filter by multiple properties of Epic Link

Hi,

I need to create a Dashboard containing multiple reports that can filter by both Program (a Jira custom field) and Due Date of an Epic Link. Is it possible to add Epic Link multiple times to the Pages section so I can have one dropdown to select Programs and another to select Due Date?

We have 30+ programs and 4 date ranges for Due Date that I need to provide filter options for so I don’t really want to create 120 calculated members to cover all the combinations if I can avoid it.

If duplicating Epic Link multiple times is not possible, what’s the best way of implementing this?

Thanks,

Andrew.

Hi @a_frayling

You can create a custom Epic link and use the value from the Program custom field.

Please check out this post by Zane describing the process of defining the custom field:

You also mention that you have 4 date ranges for the Due Date.
For this, you could also define a similar custom field, but instead of using the exact due dates, you could check the Due Date of the Epic and assign the necessary range value for the custom field. This would be a better approach instead of importing the individual date members, as we don’t recommend “duplicating” the Time dimension.

The Advanced settings for such an “Interval” field could be as follows:

[jira.customfield_NNNNN_d]
name = "Epic Due Interval"
data_type = "string"
dimension = true
update_from_issue_key = "epic_key"
javascript_code = '''
var ddate = issue.fields.duedate;
var interval = "";
if (ddate >= "2023-01-01" && ddate < "2023-02-15") {
  interval = "1st Due Interval";
} else if (ddate >= "2023-02-15" && ddate < "2023-04-01") {
  interval = "2nd Due Interval";
} else if (ddate >= "2023-04-01" && ddate < "2023-05-15") {
  interval = "3rd Due Interval";
} else if (ddate >= "2023-05-15" && ddate < "2023-07-01") {
  interval = "4th Due Interval";
}
if (interval) {
  issue.fields.customfield_NNNNN_d = interval;
}
'''

With both of these custom fields saved in the Advanced settings and imported in the import options, you can use them in your report to select the issues that are related to the Epic Program and have the Epic Due date in a certain interval:

Let me know if you have any additional questions on this!
Best regards,
Nauris / eazyBI support

Thanks Nauris, sorry it’s taken me a while to get back to this.

Unfortunately our Programs field in Jira is multi-select so I don’t think a custom field is going to work for that, but creating a JS custom field for the Due Date looks like a good option.

Waiting for another import to run to test the new custom field and will update when I’ve had chance to test the new field.

Hi Nauris, whenever I try importing the new “interval” field as a dimension in the import options every report using that EazyBI account breaks with:

org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying / integer
Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
Position: 58

This is my custom field code (realized I’m going to need more than 4 due date intervals, it’s 4 per PI):

# Custom field to allow filtering by Iteration when using Epic Link on Pages
[jira.customfield_epiciterationdue_d]
name = "Epic Iteration Due"
data_type = "string"
dimension = true
update_from_issue_key = "epic_key"
group = "Linked issue dimensions"
javascript_code = '''
var ddate = issue.fields.duedate;
var interval = "";
if (ddate >= "2023-02-08" && ddate < "2023-02-28") {
  interval = "PI13.1";
} else if (ddate >= "2023-03-01" && ddate < "2023-03-21") {
  interval = "PI13.2";
} else if (ddate >= "2023-03-22" && ddate < "2023-04-11") {
  interval = "PI13.3";
} else if (ddate >= "2023-04-12" && ddate < "2023-04-25") {
  interval = "PI13.IP";
} else if (ddate >= "2023-04-26" && ddate < "2023-05-16") {
  interval = "PI14.1";
} else if (ddate >= "2023-05-17" && ddate < "2023-06-06") {
  interval = "PI14.2";
} else if (ddate >= "2023-06-07" && ddate < "2023-06-27") {
  interval = "PI14.3";
} else if (ddate >= "2023-06-28" && ddate < "2023-07-18") {
  interval = "PI14.IP";
} else if (ddate >= "2023-07-19" && ddate < "2023-08-08") {
  interval = "PI15.1";
} else if (ddate >= "2023-08-09" && ddate < "2023-08-29") {
  interval = "PI15.2";
} else if (ddate >= "2023-08-30" && ddate < "2023-09-19") {
  interval = "PI15.3";
} else if (ddate >= "2023-09-20" && ddate < "2023-10-03") {
  interval = "PI15.IP";
}

if (interval) {
  issue.fields.customfield_epiciterationdue_d = interval;
}
'''

I have the above custom JS in Settings → Advanced Settings and “Epic Iteration Due” shows up under Source Data → Edit → Custom fields, but if I tick the option to import it as a dimension I get the above error on every report. If I untick it as a dimension (but leave the JS in Advanced Settings) every report works, but I don’t have access to the new field as a dimension.

What am I doing wrong?

Hi @a_frayling

It seems that something went wrong with the date comparisons, possibly because of a different date format.

Could you please send us your eazyBI log files (Troubleshooting)?

You can send them to support@eazybi.com or upload them to our contact form: eazyBI.

Thanks!
Nauris