Hi everyone,
I have an automation rule that I would like to share across multiple projects. The automation is designed to trigger a pipeline via a webhook, and the trigger is a scheduled job. The goal is to send a list of issues to the pipeline.
The problem I’m facing is that when the automation is shared across projects, the scheduled job's JQL query runs across all projects with which the automation is shared. It doesn’t limit the scope of the JQL to the project from which the automation is triggered.
In Jira Cloud, I’ve seen that there is a smart variable to access the project key, which could be passed into the JQL to solve this issue. However, I’m working in Jira Data Center, and I haven’t found an equivalent smart value for this.
My Question:
How can I work around this limitation?
Do I need to maintain a list of project keys in my pipeline logic and filter there?
Do I have to create a separate automation rule for each project? (There are about 30 projects, and I’d like to avoid this to reduce maintenance overhead.)
I also have ScriptRunner available. Is there a way to use ScriptRunner to help solve this problem?