Forums

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

Create Project components by script

tobbk
Contributor
July 13, 2018

Hello community,

I want to create components for different projects in scriptrunner.
I don't want to go through all projects and create a new component with leader, description and standard assignee.

I only found solutions for updating issue component.

Thanks.

2 answers

1 accepted

1 vote
Answer accepted
Alexey Matveev
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 Leaders.
July 13, 2018

Hello,

You can use the ProjectComponentManager to create a new component for a project. There is the create method.

https://docs.atlassian.com/software/jira/docs/api/7.2.3/com/atlassian/jira/bc/project/component/ProjectComponentManager.html

0 votes
Capi [resolution]
Atlassian Partner
June 27, 2019

Hi @tobbk ,

Apologies for posting so late! I'd like to bring your attention to an alternative for creating and modifying components in bulk without the need to script anything.

In Server and Data Center instances of Jira, you can use Profields' Bulk Operations to modify project attributes in bulk. Component modification is one of the most useful operations:

image (9).png 

You can see the documentation here: https://confluence.deiser.com/profields/latest/bulk-operations/components

For full disclosure, I work for Profields' manufacturer, DEISER.

Suggest an answer

Log in or Sign up to answer