Add a prefix to a label

Hello,

I would like, when creating an issue, add a prefix to the labels entered.
I assume I need to add a post_function to my workflow (after Creates the issue originally.)

Is there a simple way to rename each label in a list? By adding a prefix (and only if there is not already)

thanks for your help

Eric

2 answers

I believe you would need to use something like ScriptRunner for this.

Thanks Boris for your reply

And perhaps I can enforce the reporter to add the prefix on the create screen ... with a validator.

Is it make sense ??

You could try by using the Regular Expression Check validator, but as far as I know that only works on Custom Fields. You would need to replace your label field with a custom field of label type.

Depending on what kind of entries you are expecting to receive, there may be a better field type to use in the first place. I would consider stepping back a bit and telling us about what kind of data you are trying to store, how often it changes, etc and perhaps we can offer an easier solution.

Ok,

I am working on Jira since 2-3 month (so I am again a beginner)

My company have about 250 projects on the Jira instance.
For one of these projects (with more 15000 issues), when a reporter creates a problem, he must think of adding this prefix in the labels field. Sometimes, he can forget

So the PM asks me if it is possible to enforce a prefix.

It is important for him to easily find their labels and also ensure others don't use them.

Then I can't replace this field by a custom field.
Maybe the best way is to do it with ScriptRunner (but I'm not too comfortable with the scripts)

Thanks

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,269 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot