Hello everyone!
We would like to create automation that will make some math operations when it comes to filled fields.
So, just a little background - we already have existing fields, and we don't want to change them/edit as this could impact all the existing tickets. Therefore, we would like to add a new field that will do all the counting.
So:
1. The reporter is required to add a specific digit number in the field "How many months should this apply for";
2. There is a new field - let's name it "How many days?"
3. We would like to transition months from "How many months should this apply for" to days and add it to the new field from point 2;
4. Furthermore, we would like to add days when the ticket was closed (transitioned to completed status);
5. Automation should work on a daily basis, checking all the existing tickets and do the above;
For example:
Ticket was closed on 22/03/2024 (this mean it's 30 days);
This should apply for 6 months (180 days);
Therefore, I would like this field to show 180 days + 30 days = 210 days.
So far, I manged to figure out how to transition monthly fields to days by using the following:
{{#=}}{{issue.customfield_x}}*30{{/}}
but I have yet to figure out how to combine those with when the ticket was closed.
Could you please assist?
Thank you!
Hello @Artur
To calculate how many days ago an issue was closed, you can use: {{issue.resolved.diff(now).days}}
To add this to your existing count, you will use:
{{#=}}{{issue.customfield_x}}*30 + {{issue.resolved.diff(now).days}}{{/}}
And why not set up a trigger = issue transitioned to "Done or whichever statuses" and then update your new field with above smart value?
Hey @Kalyan Sattaluri ,
Thank you so much!
Yes, we may consider this in the future, but for now we need to identify and update older tickets.
I tried your suggestion and unfortunately, I got an error:
"Error rendering smart-values when executing this rule:
Missing parameter(s) for operatora +:10.0*30+ "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please share a screenshot of your rule and copy paste your syntax as well.
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.