bobcarroll / jira-client

A simple JIRA REST client for Java
Other
473 stars 379 forks source link

net.rcarz.jiraclient.JiraException: Project 'projectName' or issue type 'Bug' missing from create metadata. Do you have enough permissions? #248

Open SHASHI2208 opened 5 years ago

SHASHI2208 commented 5 years ago

Hi Team,

I am strugglig when i am calling to createIssue(String projectName, String issueType) Below is the sample code: BasicCredentials creds = new BasicCredentials("xyz", "pqr"); JiraClient jira = new JiraClient("RESTURL", creds);

FluentCreate newIssue = jira.createIssue("PROJECTNAME", "Bug"); //FluentCreate newIssue = jira.createIssue(String projectName, String issueType);

Note: I am sending String values in jira.createIssue(String, String) And i can update existing issue or all getMethods.

But when i am selecting project or create new issue getting below error:

net.rcarz.jiraclient.JiraException: Project 'projectName' or issue type 'Bug' missing from create metadata. Do you have enough permissions?

Please let me know if you need more information.

Thanks, Shashi

ghost commented 5 years ago

Hi @SHASHI2208 @rcarz ,, Did you find any solution? if yes please share. image

piyushbajaj0704 commented 4 years ago

Facing a similar issue. Did you get the fix? Thanks!

vzenzo commented 4 years ago

any news on this?

piyushbajaj0704 commented 4 years ago

@vzenzo I resolved this issue when I contacted my JIRA admin and it was indeed the permission issue with my JIRA API account. He reset my account and it was good to go.

vzenzo commented 4 years ago

@vzenzo I resolved this issue when I contacted my JIRA admin and it was indeed the permission issue with my JIRA API account. He reset my account and it was good to go.

thanks will try this tomorrow and let you know, I hope that is the only problem.

SHASHI2208 commented 4 years ago

Instead of this process I used API services call to create bug with json request

Princeptus commented 3 years ago

I had the same issue due to a mistake I did in the api call. I just want to share it, in case someone else does the same mistake like me.

I accidentally used as project key the project name in my request. If you face the same error message, try if the following request gives any results: http://localhost:8080/rest/api/2/issue/createmeta

If you don't get results you have a permission error, if you get all the projects as result listed then check your subset-parameters.

Anassatti commented 2 years ago

I faced the same issue, and I fixed it simply by regenerating and updating my Jira API token key. So, I suggest to everyone who sees the same problem:

  1. Check and update your Jira password or
  2. If you use Jira cloud, update your API token by generating a new one