I would like to make it so that when an issue is created, it can take in the custom field the name of the project category to which the Jira project belongs where the issue is created. Do you know if it can be done with automation for Jira or with script runner? I'm using Jira server (until I can use it of course...).
You could duplicate it, but you'll make yourself the problem that you'll need to capture "move issue" and "project changes category" and rebuild the data on those events.
I'm not sure it is of much use to the end user directly either. Whilst there is no apparent field for it, most people don't much care about the category of the project, when they're looking at an issue, the project is far more useful and important. When they do care, it's usually for a search of some sort, and "category in (x, y, z)" does work already.
The only bit that is missing is a display of the project category. A better approach than duplicating the data to a custom field would be to write a "scripted field" in Scriptrunner - it could be as short as "return issue.getProjectObject().getProjectCategoryObject().getName() " - that will be autmatically maintained, no mucking about with catching events etc.
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