Hello Atlassian Community,
I'm encountering an issue with Jira Automation. My goal is that each time a new sub-task is created under a specific ticket (or task), it should be given a unique identifier such as OP-1, OP-2, etc. However, it's vital that this counter be specific to each parent ticket.
For instance, if I create a sub-task under Task A, it should be labeled as OP-1, the next one as OP-2, and so on. Now, if I then create a sub-task under a different Task B, it should also start with OP-1, not continue incrementing from Task A.
Here's what I've tried so far:
Trigger: When a ticket is created.
Condition: The ticket type is "Operation" (or my specific sub-task type).
Action:
Set a ticket property Operation_ID for the parent ticket by incrementing its current value.
Update the sub-task fields with the new Operation_ID value from the parent ticket.
However, the results aren't as expected. The sub-tasks either get a blank value or the counter doesn't increment correctly.
Could someone guide me on how to achieve this, or if there's a better approach to handle this scenario?
Thank you in advance!