Advanced settings for custom fields

I need a Page Filter based on the following condition:

Field: Revised Due Date (date field: revised_due_date)

Page Filter Name: Revised Due Date

Dropdown Options:

Yes → revised_due_date is not empty
No → revised_due_date is empty

Could you please guide me on how to create this filter in EazyBI?

[jira.customfield_is_revised_due_date_filter]
name = “Revised_Due_Date(Filter)”
data_type = “string”
dimension = true
javascript_code = ‘’’
var dueDateChanged = false;
if (issue.changelog && issue.changelog.histories) {
for (var i = 0; i < issue.changelog.histories.length; i++) {
var history = issue.changelog.histories[i];
for (var j = 0; j < history.items.length; j++) {
var item = history.items[j];
// Check for changes to your specific custom field
if (item.field == “Revised_Due_Date”) {
dueDateChanged = true;
break;
}
}
if (dueDateChanged) break;
}
}
if (dueDateChanged) {
issue.fields.customfield_is_revised_due_date_filter = “Yes”;
} else {
issue.fields.customfield_is_revised_due_date_filter = “No”;
}
‘’’

This Query but i need current data only.

Hi @Dina,

There are two possible solutions:

  1. Use the measure “Issues with Revised Due Date” in your report. You can also apply filter >0 for this measure if you are only interested in results where this value is filled.

  2. To create a Page filter as you described, you will need to create a custom calculated field with JavaScript. Here are the steps:

  • go to Source Data → Edit → Custom fields tab

  • first, check & note the customfield_id of the “Revised Due Date” field. You will need it for the JavaScript in the later steps. You can see the customfield_id when hovering over the customfield.

  • click on “Add new calculated field” and fill the customfield details.

You can choose any name that works for you, just make sure you follow these rules:

  • internal name: a unique name using only lowercase letters, numbers, and underscores.

  • display name has to be unique but can contain spaces and uppercase letters.

  • replace xxxxx with your customfield_id for “Revised Due Date”

  • before creating the customfield, we always suggest to test a few Issues to see how it works:

  • once you have tested it, you can go ahead and create this customfield, then find it in the customfield list, select for import and run the import.

  • now you can use the new field as Page filter in your report:

Best,
Marita from support@eazybi.com