The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Can I fill in a custom field with the project category?

Deleted user
January 4, 2021

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...).

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 4, 2021

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.

Ward Schwillens_ Schwillie
Contributor
December 18, 2023

Hi @Nic Brough -Adaptavist- is there a script for this in the Scriptrunners scriptlibrary for cloud? I did not find it... 

 

Thank you!

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 18, 2023

I don't think there is, no.

DEPLOYMENT TYPE
SERVER
VERSION
8.5.0
TAGS
AUG Leaders

Atlassian Community Events