I am trying to create an automation that calculates a date in an issue field from subtracting a number in a custom field from a date in another custom field.
I can't seem to get the automation to work since one of my custom fields is just a text field with a prepopulated number that is our process lead time (varies on each card in Jira board).
I need an automation that gives me my Due Date that equals my Purchasing Need By Date (10041) minus my Lead Time (10071). The lead time needs to be expressed in business days though.
Is this possible?
welcome to the community and thank you for your question.
You should be able to convert the string from the text field to a number with the following syntax:
{{issue.YOUR FIELD.asNumber}}
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#asNumber
If it still does not work, please make sure to post a screenshot of your rule, so we can dig deeper.
So I have 2 custom fields.
The first is called "RO RMT Process Lead Time", ID 10071. This field is already hardcoded into each card and is a set value though it differs for each product.
The second in called "Purchasing Need-By Date", ID 10041. This field is entered manually by the person creating/editing the card.
I need an automation to trigger when the card is moved to a specific column which is easy enough.
The automation needs to update the "Due Date" field to equal "Purchasing Need-By Date" minus "RO RMT Process Lead Time". I need the lead time expressed as business days. So the example below shows a lead time of 13 but it is really 13 business days.
So using the info from the card below I would need 13 business days subtracted from 5/31/2024 and that resulting date populated in the "Due Date" field.
I have tried a handful of different variations now but this is the latest one I just tried and failed.
{{issue.customfield_10041.minusBusinessDays(issue.customfield_10071.asNumber)}}
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.