I am trying to extract the number of business days that lapsed since the issue was created till the day a specific field is updated.
PO Time to Resolution is the text field and the script I am using is:
{
"fields": {
"PO Time to Resolution": "{{now.diff(issue.created).businessDays}}"
}
}
I suspect there needs to be a conversion between businessDays and text in order to get it to show in the field as if I use this script:
{
"fields": {
"PO Time to Resolution": "{{now.diff(issue.created).businessDays}}d"
}
}
It will write "d" to the field.
Any input welcome please
Using this link as reference: https://docs.automationforjira.com/working-with-issue-data/date-functions.html#manipulating-dates
Hi there,
Developer from CodeBarrel here.
{{now.diff(issue.created).businessDays}} (or {{now.diff(issue.created).abs.businessDays}} if you want a positive number) should be output the difference in days. I suggest trying out our edit issue picker with your custom field and the same smart value and seeing if it works in that fashion, JSON can be tricky with getting the names of fields and structure right. If it's still not working then I'd suggest you raise a support ticket with some screenshots of your audit and audit log here: https://automationforjira.com/contact-us/
Cheers,
Yvan
Thanks. That is the rule we are using. It is still not working I am afraid. Just added in abs. and no luck.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If that's the case could you please raise a support ticket here so we can further troubleshot your issue https://automationforjira.com/contact-us/.
Cheers,
Yvan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Call logged yes. Thanks for confirming that I am not loosing my mind ;-).
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.