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

3 votes

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

Mission-critical battery manufacturer fulfills FAA software requirements with Commit Policy Plugin

EaglePicher Technologies is a leading manufacturer of battery systems for diverse industries like defense, aviation, space or medical. As they operate in highly regulated industries, keeping a clear ...

117 views 0 2
Read article

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