I am getting all historical values of due date and putting a strikethrough of all past due dates except the latest one.
e.g. for myArray = None -> 2025-04-11 00:00:00.0,
2025-04-11 00:00:00.0 -> 2025-04-25 00:00:00.0,
2025-04-25 00:00:00.0 -> 2025-06-30 00:00:00.0
The output is:
However, this formula fails for this myArray and I am unable to debug why that is the case. (Someone is setting and unsetting the value of 5/15/2025..)
myArray = None -> 2025-05-15 00:00:00.0,
2025-05-15 00:00:00.0 -> None,
None -> 2025-05-15 00:00:00.0
The output I get is
Here is the code..
Can anyone explain what is going on?
This breaks because your `unique(history)` array still includes `None` values, and the expression `$.to = LAST(myArray).to` doesn’t evaluate cleanly when one or more entries have a `to` of `None`. In Forge/Jira Automation smart values, `None` isn’t treated as a string—it’s just a null, so comparisons to it fail silently and your conditional formatting logic skips or mislabels entries. When the due date is repeatedly cleared and reset, that leaves alternating `None` and date objects, which throw off the equality check.
You can fix it by filtering out null transitions before mapping. Replace your first line with something like `WITH myArray = history.changes.filter($.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.