I would like to create an automation rule to assign a label used to sort issues into different backlogs, based on in which backlog a "Create issue"-button was clicked to create the issue.
Backlogs are part of boards, which are views of a selection of issues, not a container.
You can't know what backlog an issue was created in because the answer can easily be "loads of them"
Imagine three simple boards:
Go into board B and create an issue, say BBB-123. It will appear in the backlogs for board B and C. Similarly for A. And for an issue created in Backlog C, it will also be in two backlogs.
I think you need to look at what problem you are trying to solve here. Why would this label be of any use? What report would use it?
Technically, issues are not created in Backlogs - they are just created against Projects. So if you have different backlogs for different projects, you should be able to use the project field to add the label.
Otherwise you will need another field that gets populated when going through the different routes to create the issue.
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events