What is the project scope of onSchedule rules? Follow
I have a workflow with many modules. One module is an onSchedule. The workflow is attached to many projects.
Is there a way in the Workflow API to determine this project that the workflow is currently executing in?
Alternatively, if only one instance of the onSchedule workflow runs for all attached projects, is there a way in the API to see which projects have this workflow attached? I'd like to change some fields on a schedule, but only for projects with this workflow attached.
Thanks,
David
Please sign in to leave a comment.
Hi David,
It usually helps to keep in mind that workflows are always issue-centric. Each rule execution happens in the context of some issue. So, as a rule of thumb, one only invokes workflows for relevant issues, making additional filtering unnecessary.
You can, of course, always check ctx.issue.project value to find out the specific project the rule is running against.
I hope it helps.