Hi. We are going through a JIRA migration (on-prem) to cloud. I am trying to get a list of all the associated schemes between all the projects we have in JIRA. Is there a way to download a list of all project names with all associated schemes for Worflows, Screens and Fields?
This code may suffice your need. Kindly check.
If this works for your, kindly accept the answer.
import com.atlassian.jira.component.ComponentAccessor
import org.apache.log4j.Category
import com.atlassian.jira.project.Project
def issueTypeScreenSchemeManager=ComponentAccessor.getIssueTypeScreenSchemeManager()
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def Category log = Category.getInstance("com.onresolve.jira.groovy.PostFunction")
log.setLevel(org.apache.log4j.Level.DEBUG)
//gives info about projects
def allProjects = ComponentAccessor.getProjectManager().getProjectObjects()
//Project prj = ComponentAccessor.getProjectManager().getProjectObjByKey("HCI")
def issueTypeSchemeManager = ComponentAccessor.getIssueTypeSchemeManager()
def issueTypeScreenScheme = ComponentAccessor.getIssueTypeScreenSchemeManager()
def wrkflwScheme = ComponentAccessor.getWorkflowSchemeManager()
def fieldScheme = ComponentAccessor.getFieldLayoutManager()
allProjects.each{it->
Project p =ComponentAccessor.getProjectManager().getProjectObj(it.getId())
log.info("Project Name is: " +it.getName())
log.info("Project Id of Long type is: " +it.getId())
log.info ("Issue type Screen scheme is :"+issueTypeScreenSchemeManager.getIssueTypeScreenScheme(p).getName())
log.info("Issue types associated with project is: " +it.getIssueTypes()*.name)
log.info("Workflow Scheme for Project: " +it.getName().toString() +" is: "+wrkflwScheme.getWorkflowSchemeObj(p).getName())
log.info("Screen Scheme is :" +issueTypeScreenScheme.getIssueTypeScreenScheme(p).getName())
log.info("Field Config Scheme is :" +fieldScheme.getFieldConfigurationScheme(p)?.getName())
log.info('---------------------------------------------------------------------')
}
Thanks,
Aditya
Hi Aditya, thank you so much for your reply. I found out that our projects will be transferred without any issues and this information is not required. I have not tried this solution. But if it worked at your end, I am happy to Accept this answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Khaja. This is a tested solution, so you can accept if you feel like :)
Thanks,
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aditya,
Can we also include the screens to this? Also I see this code works partially and does not show up all the project data in the logs.
Below is a sample from the output:
Project Name is: Services - Project Zuko 2024-09-13T01:48:41,593 INFO [groovy.PostFunction]: Project Id of Long type is: 31031 2024-09-13T01:48:41,595 INFO [groovy.PostFunction]: Issue type Screen scheme is :SSL: Simple Issue Tracking Issue Type Screen Scheme 2024-09-13T01:48:41,595 INFO [groovy.PostFunction]: Issue types associated with project is: [Epic, Task, Sub-Task] 2024-09-13T01:48:41,596 INFO [groovy.PostFunction]: Workflow Scheme for Project: Services - Project Zuko is: SPZ: Software Simplified Workflow Scheme for 2024-09-13T01:48:41,596 INFO [groovy.PostFunction]: Screen Scheme is :SSL: Simple Issue Tracking Issue Type Screen Scheme 2024-09-13T01:48:41,596 INFO [groovy.PostFunction]: Field Config Scheme is :: Default Field Configuration Scheme
Thanks,
Swapan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the Community!!
Use Optimizer for Jira Add-on Trial to download the list, you will get all the reports
https://marketplace.atlassian.com/apps/1217194/optimizer-for-jira?tab=overview&hosting=datacenter
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pramodh, thank you for your reply. I found out that our projects will be transferred without any issues and this information is not required. I did not get a chance to try this solution. Since this is an add-on, I will test this in the future.
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.