Hi there!
I am currently working on a automation project in which I need to send an email with certain informations from a list of lookupIssues tikckets. One of these informations is to get the difference between the fixVersion startDate and fixVersion releaseDate. To do so, I work with smart values. Here's the code:
{{#lookupIssues}}
{{fixVersions.first.startDate.diff(fixVersions.first.releaseDate)}}
{{/}}
(the .first is because fixVersions are lists but we are sure that there will always be only one fix version per ticket so it's fine)
As you can see, by code is pretty simple, with a lookupIssues list that contains for now two tickets:
1st ticket: fixVersion startDate is 17 June 2024, fixVersion releaseDate is 27 June 2024.
2nd ticket: fixVersion startDate is 14 May 2024, fixVersion releaseDate is 18 May 2024
As you can see, if you do the difference between the startDate and the releaseDate of each ticket, the result should be 10 for the first and 14 for the second. However, when I test this, the result is 10 and 44.
Here's the automation and the result.


The only thing I can notice here is that the code somehow does the difference between the startDate of the current ticket and the releaseDate of the first ticket, as the difference between May 14th and June 27th is in fact 44 days.
Keep in mind that I cannot use a foreach loop as I send an email that will be sent too many times in a loop. I don't understand why this doesn't work as expected, and why it semingly takes only the value from the first ticket in the list for the difference. Can anyone help me figure this one out?