I am integrating with an external system using Jira Automation. That external system is returning date values in seconds-since-1970 e.g. Aug 6, 2024 is being returned as 1722906223
I have mulled over this a bit. And tried various ideas but am a bit stumped as to how to actually make it work with Jira Automation. Note that this is all within the context of getting data from another system and processing a list of items (so in Jira Automation terms, this is already within a branch).
While trying to write something with Jira Automation I was running into its limitations e.g. cannot use a variable within and expression, cannot do math within an expression, etc.
If it makes any difference, I am putting the computed value into a JSM Assets object (not an Assets field either). I am NOT dealing with Jira issues in this context.
Figured it out, I was doing one thing wrong.
The solution is simple-enough:
For testing/dev purposes assume value to be converted is in a variable named "AugustSixTwentyFour" with value of 1722906223 (Unix time for 6 Aug 2024)
Define a Variable "JanOneSeventy" with value "01/01/1970"
This should give the correct answer:
{{JanOneSeventy.toDate("dd/MM/yyyy").plusSeconds(AugustSixTwentyFour.asNumber)}}
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.