It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

renaming issue type scheme to given value using groovy script

Sumit Kumar Feb 25, 2014

I want to rename issue type scheme to a given "String value" using groovy.

is it possible , if Yes how ?

Thanks in advance ..!!

Regards,

Sumit

1 answer

1 accepted

0 votes
Answer accepted
Andreas Ebert Feb 25, 2014

Its relatively straight-forward. Try something like this for JIRA 6:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.config.FieldConfigScheme;

itsm = ComponentAccessor.issueTypeSchemeManager;

for (scheme in itsm.allSchemes) {
    // 1. get the scheme we want to edit
    if (scheme.name == "old scheme name") {
        // 2. edit our scheme
        itsm.update(
                new FieldConfigScheme.Builder(scheme)
                        .setName("new scheme name")
                        .toFieldConfigScheme(),
                scheme.associatedIssueTypeIds);

    }
}

I didn't test my code. So, try to run it in a test-system first, just in case. :)

Sumit Kumar Feb 26, 2014

Can you tell me same for renaming Workflows , Field Configurations & Screen Scheme ?

Thanks in advance.!

Regards,

Sumit

Andreas Ebert Feb 26, 2014

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Join our webinar: “Asset Management: The Role of Context in ITSM” with Atlassian & Riada

  Hi Atlassian Community! This is Teresa from the Jira Service Desk team. On June 19th, I’ll be hosting a webinar “Asset Management: The Role of Context in ITSM” with Atlassian Partne...

130 views 1 3
Read article

Community Events

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

Events near you