Hi @Kyung_Park,
In Import options, you can create a new calculated field (Account specific calculated fields).
-
Chose the data type “Sting” as results would be tests Yes / No
-
Select the field for data import as “Dimension” so you can group and filter data by end results.
-
In the JavaScript field, enter the code to compare dates. The logic would be tist to check if issieu has both dates and only then compare them. The code might look like this:
// Check if both dates exists if (issue.fields.customfield_CCCCC && issue.fields.customfield_PPPPP) { // Parse dates into timestamps for comparison let completedDate = Date.parse(issue.fields.customfield_CCCCC); let publishDate = Date.parse(issue.fields.customfield_PPPPP); // Compare dates and return appropriate value if (publishDate >= completedDate) { return "Yes"; } else if (completedDate > publishDate) { return "No"; } }In the code example update the
customfield_CCCCCandcustomfield_PPPPPwith custom field ID that are holding the dates. -
I recommend testing the code on individual issues, one for each outcome.
On the Cloud and starting eazyBI version 8.0 (which will be released soon), an AI assistant can help you write JavaScript code.
Here are more details on how to work with eazyBI AI assistants: AI Assistants
Best,
Zane / support@eazyBI.com