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.
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?
Hello @ChristopherChilds
for a scheduled rule, Jira does not really have a built-in concept of “current project” in the way you would need here.
Once the rule is shared across multiple projects, the scheduled JQL runs against the full rule scope, so if you want project-specific behavior, you usually need to define that explicitly.
So from what you described, I would say your practical options are:
create separate rules per project
keep one shared rule, but handle the project-specific filtering/mapping inside the logic
use a more advanced scripting option if you need true per-project iteration from one scheduler
I would not expect a native smart value to dynamically scope a shared scheduled rule to just one “current” project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.