The Procurement project have many issue types "Project , invoice , task, idea" every issue type has its own workflow
If the issue type is "Project", we set the field "Need invoicing" to "Yes" if there is a need to invoice, then we create a ticket on the same project with issue type "Invoice" and linke it to the main ticket. When the Invoice ticket is set to status "Invoice is paid", it is closed with status "Invoiced"
When we close the main ticket we need to add a condition, if the "Need Invoicing"= "Yes" the linked ticket with "issue type" = "Invoice" its status should be "Invoiced"
How can we implement this condition? as this issue is impacting the business
a detailed script runner example is highly appreciated.
Note: we may have couple of subtasks and couple of linked tickets in the main ticket
Thanks