How can we get last modelVersion number used for Jira Upgrade task ?

Hi,

I am using Jira 6, I wanted to execute upgrade task for one of my table. To execute upgrade task, I need to pass higher modelVersion number than last used, but I forgot a last used modelVersion number. So is there any way to know a last used modelVersion number ?

Kindly give me answer.

 

Thanks.

1 answer

0 vote

The way this question is phrased suggests you are doing something you really should never do to an Atlassian system.

Instead of trying to ask about the solution you seem to have arrived at, could you give us the context of what you are doing?  For example, don't tell us "I want to amend some data", tell us "I am working with versions in Jira and need to see how it has changed on issues"

Thanks Nic Brough,

When we are implementing ActiveObjectsUpgradeTask, we have to Override following method.

@Override
public ModelVersion getModelVersion() {
return ModelVersion.valueOf("5");
}

If Jira found higher version value of ModelVersion then only it will execute upgrade() method. 

@Override
public void upgrade(ModelVersion modelVersion, ActiveObjects activeObjects){

..... // some code.

}

 

Now tell me How can we get last value of that number so that I can pass higher  value of that number and my upgrade() method can execute.

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,296 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