Scenario: Each month we clone one particular Story so we do not have to manually create 30 Sub-Tasks. We wish to condense our rule so we do not have to open each component, make the Month or Date Change, then save and edit the next component. We have 7 components.
Examples of Components: After cloning the Story all the Sub-Tasks have the word "Clone - " added to the beginning of the summary field. We use the following "Then: Edit issue fields" to remove "Clone - " - {{issue.summary.substringAfter("- ")}}. This saves us from opening 30 Sub-Tasks and editing each summary.
15 Components have the Month present in the summary. We use the following to find the old month and update with the current month: {{issue.summary.replace("March", "April")}}
The remaining 15 Components have various dates that need to be replaced. The following is one example: {{issue.summary.replace("3/12/24", "4/15/24")}}
Each month the JQL is updated so that our rule only makes changes to the one Story in the project: project = ProjTest AND Parent = Story-1001 AND issuetype = Sub-task order by created DESC
Question 1. Is it possible to use a Lookup Table at the beginning of our rule so we only have to update that one component and not have to open and edit the other 7? So far our attempts have failed. Key = PriorMonth, Value = March. Key = ThisMonth, Value = April. Edit issue: {{issue.summary.replace({{TEST.get("PriorMonth")}},{{TEST.get("ThisMonth")}})}}
Question 2. If question #1 is possible can we adjust the Lookup Table Values with Smart Values? March would = {{now.minusMonth(1)}} AND April would = {{{{now.Month}}}}. This would eliminate the need to make this change each month.