I am trying to create a JMCF field that looks at the "Due Date" of an issue and the "Resolved Date" of an issue. The custom field would be called "In SLO?" As you can imagine if the resolved date is greater than the due date we want the field to print "no" or "false." That part seems easy.. we have the following expression:
issue.get("duedate") >= issue.get("resolutiondate")
The issue is the due date field only pulls in mm/dd/yyyy and resolution pulls as mm/dd/yyyy hh:mm:ss. We do not want to change either fields set up but we need a way to change the expression above to only compare the mm/dd/yyyy portion of the dates as some issues are being marked as "false" because they are being resolved on the same day as the due date. For example, one issue has a due date of 07/01/2022 and was resolved 07/01/2022 09:01:23 and is being marked as "false" when really, for our purposes, that should be marked as true.
We do not want to import any scripts either, we just hope to be able to edit the one above.
Hi @Nick H
Did you try formatting the resolution date?
issue.get("duedate") >= issue.get("resolutiondate").format("yyyy/MM/dd")
The above format might not be appropriate. Try others like "dd/MM/yyyy", or whatever format the due date yields.
Regards,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.