This must be a simple thing I've overlooked.
I created five new projects a couple of days ago by cloning another project and when I create a new issue the new projects are not listed in the project select list field.
I created a new project by the same means about 8 weeks ago, I remember it was fairly easy and that project is listed.
The issues, workflows, screens, fields and permission scheme for all projects are the same. The associated schemes and configurations all are the same. (The reason for the projects is just to have different keys on issues for a different business area.)
So I'm a bit baffled. Any suggestions would be appreciated.
Thanks.
That sounds like it's permissions. Have a look at the permission scheme for the projects, and look at the line that says "create issue". Then check your account matches at least one of the rules in there
Note that being an admin doesn't give you any "can do anything" permissions, as that's a terrible security model - you need to include your account. Even if it is "create = must have system admin rights"
Hi Jan,
As Nic mentioned, this is most likely a permission missing.
Either the Create Issue permission or the Browse Project permission may be missing for your user.
Hope this helps,
Marcus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nic, Marcus,
Thanks! I feel stupid but most definitely grateful:)
Jan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I got this solved now. I use:
1.
ProjectManager pm = ComponentAccessor.getProjectManager();
Project p = pm.createProject(name, key, description, lead, null, AssigneeTypes.PROJECT_LEAD);
2.
PermissionSchemeManager psm = ComponentAccessor.getPermissionSchemeManager();
psm.removeSchemesFromProject(project);
psm.addSchemeToProject(project, configuration);
3.
IssueTypeSchemeManager itsm = ComponentAccessor.getIssueTypeSchemeManager();
FieldManager fm = ComponentAccessor.getFieldManager();
FieldConfigSchemeManager fcsm = ComponentAccessor.getFieldConfigSchemeManager();
FieldConfigScheme fieldConfigScheme = itsm.getDefaultIssueTypeScheme();
Long[] currentProjectId = new Long[]{p.getId()};
JiraContextTreeManager jctm = ComponentAccessor.getComponentOfType(JiraContextTreeManager.class);
List<JiraContextNode> removeContext = CustomFieldUtils.buildJiraIssueContexts(false, null, currentProjectId, jctm);
fcsm.removeSchemeAssociation(removeContext, fm.getIssueTypeField());
Long[] projectIds = new Long[associatedProjects.size() + 1];
int i = 0;
for (Project p : associatedProjects) {
projectIds[i] = p.getId();
i++;
}
projectIds[i] = p.getId();
List<ProjectCategory> associatedProjectCategories = fieldConfigScheme.getAssociatedProjectCategoryObjects();
if (associatedProjectCategories == null) {
associatedProjectCategories = Collections.EMPTY_LIST;
}
Long[] projectCategoryIds = new Long[associatedProjectCategories.size()];
i = 0;
for (ProjectCategory pc : associatedProjectCategories) {
projectCategoryIds[i] = pc.getId();
i++;
}
List<JiraContextNode> updateContexts = CustomFieldUtils.buildJiraIssueContexts(fieldConfigScheme.isGlobal(),
projectCategoryIds,
projectIds, jctm);
fieldConfigScheme = fcsm.updateFieldConfigScheme(fieldConfigScheme, updateContexts, fieldConfigScheme.getField());
fm.refresh();
4.
IssueTypeScreenSchemeManager itssm = ComponentAccessor.getIssueTypeScreenSchemeManager();
itssm.addSchemeAssociation(p, itssm.getDefaultScheme());
itssm.refresh();
5.
pm.refresh();
.. Other steps besides permission scheme could be unnecessary, but I set other values than defaults.
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.