The Projects selection field in the listener configuration screen is ignored if the event that triggers the listener is a "component event" such as the "ProjectComponent Event".
We currently only acknowledge the Project Selection field for Issue events, worklog events and version events.
We should add the component events to the list of events that consider the project selection field, and it would also be good to notify users when the selected event ignores the project select field.
Steps to reproduce
- Create a custom listener and set the event to the "ProjectComponentCreatedEvent"
- Set a specific Project in the "Project(s)" filter field
- Create a Component in a project you did not include in listeners the "Project(s)" filter
- You should see the Listener still gets triggered.
A possible workaround would be to detect the project name within the actual script and then use if blocks to make sure the script logic only runs for your wanted projects.
Example Custom Listener script: