Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jira init fails at configuring metadata step #757

Open
adezxc opened this issue Aug 6, 2024 · 4 comments
Open

Jira init fails at configuring metadata step #757

adezxc opened this issue Aug 6, 2024 · 4 comments

Comments

@adezxc
Copy link

adezxc commented Aug 6, 2024

jira init fails when running /rest/api/2/issue/createmeta endpoint. I am not sure if it's my work instance's specifics, but I get a 404 at that step after choosing a board (even if I choose None). I think this is related due to the createmeta endpoint getting deprecated (https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304) If you could confirm this, I'd be happy to try and undertake the task of migrating to /rest/api/2/issue/createmeta/{projectIdOrKey}/issuetypes and /rest/api/2/issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}

Please provide following details

  1. JiraCLI Version:
    (Version="v1.5.1", GitCommit="", CommitDate="", GoVersion="go1.22.3", Compiler="gc", Platform="linux/amd64")
    
  2. Are you using Jira cloud or on-premise jira server?
    Jira cloud enterprise instance
  3. What operating system are you using? Also mention version.
    Debian Linux on WSL2
    

Output when running jira init --debug --installation cloud --server https://jira-instance.com --login example@email.com --project DMGTM --board 'None' --auth-type bearer

GET /rest/api/2/myself HTTP/1.1
Host: jira-instance.com
Authorization: Bearer <token>

⠹ Fetching projects...

REQUEST DETAILS
------------------------------------------------------------

GET /rest/api/2/project?expand=lead HTTP/1.1
Host: jira-instance.com
Authorization: Bearer <token>

⠧ Fetching boards for project 'DMGTM'...

REQUEST DETAILS
------------------------------------------------------------

GET /rest/agile/1.0/board?projectKeyOrId=DMGTM HTTP/1.1
Host: jira-instance.com
Authorization: Bearer <token>

⠙ Configuring metadata. Please wait...

REQUEST DETAILS
------------------------------------------------------------

GET /rest/api/2/issue/createmeta?projectKeys=DMGTM&expand=projects.issuetypes.fields HTTP/1.1
Host: jira-instance.com
Authorization: Bearer <token>

✗ Received unexpected response '404 ' from jira. Please try again.
@ankitpokhrel
Copy link
Owner

Related #742 #726

This was fixed with #447 🤔.

Are you sure you are on a cloud instance?

@quentincaffeino
Copy link

I experience the same behavior with
Go: 1.23.0
Jira cloud: v9.4.23
Jira cli: 1.5.1

@johnnylambada
Copy link

Interestingly, I don't get a 404 when I try to run it with curl:
curl -H "Authorization: Bearer $JIRA_API_TOKEN" "https://jira.mycompany.com/rest/api/2/issue/createmeta?projectKeys=MYPROJ&expand=projects.issuetypes.fields"
{"errorMessages":["Issue Does Not Exist"],"errors":{}}%

@andyatmiami
Copy link

andyatmiami commented Jan 20, 2025

Still experiencing the following:

$ jira init --debug --installation cloud --server https://issues.redhat.com --login astonebe@redhat.com --project "RHOAIENG" --board "RHOAI IDE+Docs (standup-optimized)" --auth-type bearer
⠙ Verifying login details...

REQUEST DETAILS
------------------------------------------------------------

GET /rest/api/2/myself HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer <token>

⠧ Fetching projects...

REQUEST DETAILS
------------------------------------------------------------

GET /rest/api/2/project?expand=lead HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer <token>

⠹ Fetching boards for project 'RHOAIENG'...

REQUEST DETAILS
------------------------------------------------------------

GET /rest/agile/1.0/board?projectKeyOrId=RHOAIENG HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer <token>

⠋ Configuring metadata. Please wait...

REQUEST DETAILS
------------------------------------------------------------

GET /rest/api/2/issue/createmeta?projectKeys=RHOAIENG&expand=projects.issuetypes.fields HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer <token>


✗ Received unexpected response '404 Not Found' from jira. Please try again.

System info:

$ jira version
(Version="1.5.2", GitCommit="34221786aaa12d5bc66039d164b6d9587b0799c7", CommitDate="2024-09-20T08:29:56+00:00", GoVersion="go1.23.1", Compiler="gc", Platform="darwin/arm64")

Cloud info:

License Information for Jira
Jira v9.12.15

w.r.t @johnnylambada 's observation above - I think that IS evidence of the 404 error being discussed.. I see similar behavior but when I pass -I to curl - you can see its a 404 response code plainly (the body of the response just happens to return JSON as described above)

$ curl -I -H "Authorization: Bearer $JIRA_API_TOKEN" "https://issues.redhat.com/rest/api/2/issue/createmeta?projectKeys=RHOAIENG&expand=projects.issuetypes.fields"
HTTP/2 404 
x-arequestid: 1029x33167465x24
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants