Hi All,
I need to find the list of projects associated with the default issue type scheme. Is there a JQL query for the same?
Thanks and Regards,
Jenin C M
JQL searches for issues, not projects.
I assume you're trying to do this in code somewhere, as you can simply look at the admin UI to see which projects are on the default issue type screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably a hangover from the forum before last.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The following worked for me with JIRA 6.4.4
import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManager import com.atlassian.jira.issue.fields.config.FieldConfigScheme import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.util.SimpleErrorCollection import java.util.Collections /** * Find all projects that use the Default Issue Type Scheme. * No data is changed. * * Matt Doar * ServiceRocket */ def componentManager = ComponentManager.getInstance(); def projectManager = componentManager.getProjectManager(); def issueTypeSchemeManager = ComponentAccessor.getIssueTypeSchemeManager() StringBuffer sb = new StringBuffer(); def projects = projectManager.getProjectObjects(); count = 0 for (project in projects) { FieldConfigScheme its = issueTypeSchemeManager.getConfigScheme(project); if (its.getName().equals("Default Issue Type Scheme")) { sb.append(project.getKey() + "<br/>"); count += 1; } } sb.append("Total: " + count); return sb.toString();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Updated for JIRA 7.2.4 (minimal changes)
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManager import com.atlassian.jira.issue.fields.config.FieldConfigScheme import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.util.SimpleErrorCollection import java.util.Collections /** * Find all projects that use the Default Issue Type Scheme. * No data is changed. Runs in a few seconds. * * Matt Doar * ServiceRocket */ def projectManager = ComponentAccessor.getProjectManager(); def issueTypeSchemeManager = ComponentAccessor.getIssueTypeSchemeManager() StringBuffer sb = new StringBuffer(); def projects = projectManager.getProjectObjects(); count = 0 for (project in projects) { FieldConfigScheme its = issueTypeSchemeManager.getConfigScheme(project); if (its.getName().equals("Default Issue Type Scheme")) { sb.append(project.getKey() + "<br/>"); count += 1; } } sb.append("Total: " + count); return sb.toString();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matt,
What is the proper way of running your script?
I appreciated for your outcome!
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.
Hi Nic,
Thanks for the response!
I am on Jira 5.2.11 and unfortunately in UI for 'default issue type schehe' it shows 'Global (all unconfigured projects)'. Rest of the schemes do show the list.
Should we try to find it through database? Could you please provide me the query for the same?
Thanks and Regards,
Jenin C M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, yes, I was thinking about other schemes.
The problem with issue type schemes is that it's a negative. The system uses whatever scheme you choose for a project, but if you don't choose one, t here's nothing stored. When it needs to know the issue type scheme, it looks for a setting, finds nothing, and hence uses the default.
I think your only option is a negative query - get the full list of projects and then remove any that have any scheme set. I don't know the SQL for that, but the last time I did it (5.1), I simply clicked "associate" to the right of the default scheme and then scraped the html option list (because it's a full list of all projects *not* currently using the default)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.