My new projects are not appearing in project select list field

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.

2 answers

1 accepted

This widget could not be displayed.

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

Nic, Marcus,

Thanks! I feel stupid but most definitely grateful:)

Jan

This widget could not be displayed.

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.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

262 views 5 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you