Forums

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

Cloud-to-cloud migration using BETA feature limitation

Alex Kiselev _Itransition_
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 Champions.
April 3, 2023

Hi community,

 

We are using the Cloud-to-cloud migration feature migrating jira projects

https://support.atlassian.com/migration/docs/perform-a-cloud-to-cloud-migration-for-jira/

Which is not applicable for

- team-managed

- JSM

projects.

 

Is there any known limitations or restrictions?

It looks like:

- automation rules (could be solved via export-import)

- dashboards

are not transferring.

 

Could you complete the list of restrictions according to your experience please?

Any advises of how to perform these additional migration steps will be appreciated.

 

Thank you.

1 answer

4 votes
Gaston Valente
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 Champions.
May 23, 2018

Stefan,

Here's a groovy snippet to reindex an issue.

However, issue indexing is automatic after an update, check if you're doing the actions in the right order

Let me know if i can help you with anything else

 import com.atlassian.jira.event.issue.AbstractIssueEventListener;
import com.atlassian.jira.event.issue.IssueEvent;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.util.ImportUtils;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.index.IssueIndexingService;

MutableIssue mutableIssue = ComponentAccessor.getIssueManager().getIssueObject(issue.getKey());
boolean isIndex = ImportUtils.isIndexIssues();
ImportUtils.setIndexIssues(true);
IssueIndexingService IssueIndexingService = (IssueIndexingService) ComponentAccessor.getComponent(IssueIndexingService.class);
IssueIndexingService.reIndex(mutableIssue);

ImportUtils.setIndexIssues(isIndex);
Stefan Caloian
May 23, 2018

Would I place this in the script for the post function?

Gaston Valente
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 Champions.
May 24, 2018

Stefan,

You can place it in a post function or in a listener.

Usually the last post function performs a reindex

nallu
November 1, 2018

Hi @Gaston Valente,

I have created a Script listener by referring your code. But It doesn't work. Can you please look into my code and tell me what i am doing wrong. 

 

import com.atlassian.jira.event.issue.AbstractIssueEventListener;
import com.atlassian.jira.event.issue.IssueEvent;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.util.ImportUtils;
import com.atlassian.jira.issue.Issue;
//import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.index.IssueIndexingService;

import com.atlassian.jira.issue.search.SearchProvider;
import com.atlassian.jira.jql.parser.JqlQueryParser;
import com.atlassian.jira.web.bean.PagerFilter;

Issue issue = event.issue

//Get issue key
def currKey = issue.getKey();

//Query for all features where linked epic = current key
def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser);
def searchProvider = ComponentAccessor.getComponent(SearchProvider);
def issueManager = ComponentAccessor.getIssueManager();
def user = ComponentAccessor.getJiraAuthenticationContext().getUser();

def queryString = 'issuetype = Feature AND "Linked Epics" = ' + currKey;
def query = jqlQueryParser.parseQuery(queryString);
def results = searchProvider.search(query, user, PagerFilter.getUnlimitedFilter());


if (results)
{
results.getIssues().each {documentIssue ->
boolean isIndex = ImportUtils.isIndexIssues();
ImportUtils.setIndexIssues(true);
IssueIndexingService IssueIndexingService = (IssueIndexingService) ComponentAccessor.getComponent(IssueIndexingService.class);
IssueIndexingService.reIndex(documentIssue);

ImportUtils.setIndexIssues(isIndex);
}
}
Like Willy Wijaya likes this
nallu
November 7, 2018

Never mind. I fixed it. thanks!

Elsa Bautista
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 6, 2019

Nallu, how do you solved it?

Sylvain Leduc
Contributor
May 28, 2021

Hello @nallu 

I'm also interested :-)

What was missing ?

Willy Wijaya
Contributor
December 6, 2022

Hi @nallu  and @Gaston Valente ,

Thanks a lot for the references. 

Best Regards,
Willy Wijaya

Suggest an answer

Log in or Sign up to answer