How to automatically update custom field value for all exisitng issues of the project if Context is

I have a drop down custom field  "ProjectGroup" and I have created a separate context for projects with some default value.

 

For Example: Context 1

Default Value = A

Projects : Project 1, Project2 , Project 3.

 

Context 2

Default Value = B

Projects: Project4, Project5 , Project6

 

Now If I move Project1 from Context1 to Context2 , I want custom field value of all existing issues of project 1 should get updated to B.

 

Is there any way to achieve this?

 

 

2 answers

Hello,

 

Default value based on context does not "stick" - once an issue has a value set, it's set and it no longer has any connection to the context. Default value setting is only valid for when a new issue is created and ends there.

 

You would therefore need to update those issues separately.

 

Best regards,

 Radek

 

// edit

I see some suggestions on how to update the values.

 

If it's a single-select field, you can make do by filtering the issues out in an issue navigator and performing a bulk update on them.

If it's a multi-select, bulk update is not good - it would erase the other values if there're more than 1. In this case, without add-ons, I find it better to download the issues as .csv, modify the needed value, and upload it back via .csv import afterward. That way you only update a single object retaining the others.

 

Anyhow, if you're not sure about the outcome, I whole-heartily suggest to test the whole context change somewhere safe first. You can actually erase the values if you don't plan ahead.

Alexey Matveev Community Champion Jan 05, 2018

@Radek Dostálgood point about bulk update and csv. I totally forgot about it. Thanks

@Radek Dostál  updating issue via bulk upload is a manual effort. I want changes to to get apply automatically so that if anyone forget to bulk update after changing the context then it will not create data issue.

0 vote
Alexey Matveev Community Champion Jan 05, 2018

Hello,

It would be nice to know if you are on Cloud or Server.

But basically If you want an out of the box solution, you could develop a plugin to do the task or use Jira Rest API (You would need to iterate over all issues which must be changed and then update the issues one by one). Or you could use an add-on which will let you write such tasks easier. There are a few like this in the marketplace. For example, Power Scripts. You can find more information here about Power Scripts.

https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.jjupin/server/overview

If you need any further help, kindly ask.

We are using Jira server..

That is a paid plugin :(

Alexey Matveev Community Champion Jan 05, 2018

That is right. You can try to look for other plugins. Try Automaion Lite for Jira. I guess it also can do the trick. There is a lite version which is free:

https://marketplace.atlassian.com/plugins/com.atlassian.plugin.automation.jira-automation-plugin/server/overview

You will have to create a scheduled job and then provide JQL query for issues which you want to change. Then you choose the edit issue action and set  the required by you field. That is all.

@Alexey Matveev Thanks for the info. I will try Automation Lite

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 21, 2018 in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

1,202 views 10 18
Read article

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