I'm working on a migration from Jira Server to Jira Cloud. All email domains are reviewed and marked as trusted. Last week I transferred 7 projects with no problems. This week during the pre-migration check I got "You haven't reviewed all your domains". I clicked "Complete Domain Verification" and all domains are marked as trusted (100% COMPLETE 2 out of 2 trusted domains (2 domains total)).
Before proceeding with the migration, I updated the "Jira Cloud Migration Assistant" from version 1.10.5 to 1.10.7. I reinstalled version 1.10.5 when I got the error message. That didn't help, I get the same error.
I appreciate any help.
If you want to set the Components field automatically during issue creation based on the Description, you can use a Set Field Value post-function on the Create transition, with a Groovy Expression value such as:
if (issue.get("description")?.contains("cityA"))
return "componentA"
if (issue.get("description")?.contains("cityB"))
return "componentB"
//etc for the other cities
return null; //if description contains none
I have script like this, but when i use it in JMWE postfunction issue create it did not selects right component
import com.atlassian.jira.project.Project
import com.atlassian.crowd.embedded.api.User
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.user.util.DefaultUserManager
import com.atlassian.jira.util.ImportUtils
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.comments.CommentManager
import com.atlassian.jira.issue.fields.CustomField
MutableIssue issue = issue
def projectComponentManager = ComponentAccessor.getProjectComponentManager()
def project = issue.getProjectObject()
def compA = projectComponentManager.findByComponentName(project.getId(), "componentA");
def compB = projectComponentManager.findByComponentName(project.getId(), "componentB");
def compC = projectComponentManager.findByComponentName(project.getId(), "componentC");
if(compA != null && issue.getAsString("description").contains ("Location: cityA")){
issue.setComponent([compA])
}
if(compB != null && issue.getAsString("description").contains ("Location: cityB")){
issue.setComponent([compB])
}
if(compC != null && issue.getAsString("description").contains ("Location: cityC")){
issue.setComponent([compC])
}
Maybe I do someth wrong ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And at what point would you like to set the component based on the description? During issue creation? During another transition?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Artur Sox
You can use the post-function in the JMWE plugin
here's the docs
https://innovalog.atlassian.net/wiki/spaces/JMWE/pages/68878480/Set+field+value
You can choose the component field and use the groovy expression to check if the description contains the string "cityA" and then set the relevant component.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please see here
https://innovalog.atlassian.net/wiki/spaces/JMWE/pages/113311862/Accessing+the+fields+of+an+issue
You can access the description field and check if the string contains the value "cityA"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.