There is one project to handle production deployments. Let's say I have three products (Products A, B, & C) with three correlating teams (Teams A, B & C) with multiple product approval leaders on each team. When an engineer on any one of the teams need to open a deploy ticket, they need to specify the Product Team so that the correlating product leads can approve the request. Currently a lead approves the ticket by transitioning the status into the "Approved" status and the only condition is that they must be set as the custom Role "Approver" for the project. This allows other leaders to improperly approve another teams product request.
How can I restrict Leads from Team A from approving product requests that are related to Product B and should be approved by Team B Leads?
We have scriptrunner, and Automation for Jira for assistance. This is also cloud.