to avoid creating lot of if then rules, I created a lookup variable to set the SLA in hours based on issue's priority.
I'm able to get the value for a given issue's priority but when trying to use that output to add those hours to the {{issue.created}} to set the Due Date, I'm not getting anything.
{{issue.created.plusBusinessHours(daysRndSLA.get(issue.priority.name.toLowerCase()))}}
Log show me that {{daysRndSLA.get(issue.priority.name.toLowerCase()}} is returning the value
On the other hand, this works
{{issue.created.plusBusinessHours(16))}}
I tried combinations of creating an intermediate variable, the variable's log look ok but combining with the plusBusinessHours() it doesn't work.
I want to avoid doing 5 if then rules.
Thank you in advanced
PS: I'm using Jira Cloud
Hello @Juan Caracoche
if {{daysRndSLA.get(issue.priority.name.toLowerCase()}} is giving a value, then try to convert it to number, like below and try:
{{issue.created.plusBusinessHours(daysRndSLA.get(issue.priority.name.toLowerCase()).asNumber)}}
Hope it helps.
Thank you!!! It works!
I have tried with ".number" I did not try "asNumber"
Thank you you save me doing a mess with multiple ifs!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.