MrRefactoring / jira.js

A JavaScript/TypeScript wrapper for the JIRA Cloud, Service Desk and Agile REST API
https://mrrefactoring.github.io/jira.js/
MIT License
366 stars 49 forks source link

Issue transitions/getIssue returning 404 with issueKey #169

Closed junip closed 2 years ago

junip commented 2 years ago

I tried to get the available transition for a specific issue with issueKey. if I try with issueId its works fine (i.e 10034 etc). but if I try with issueKEY (TEST-123) it returns 404.

Also, I checked the issue transitions API in postman it's working fine.

const config = new Version2Client({
              host: hostUrl,
              authentication: {
                  basic: {
                      email: emailAddress,
                      apiToken: apiToken
                  }
              }
            });

// facing issue with this 
  config.issues.getTransitions({issueIdOrKey: 'TEST-345'}).then(response => {
         console.log(response)
         }).catch(response => {
        console.log("err", response);
       })

     // it's working fine with issueID 
    config.issues.getTransitions({issueIdOrKey: 1203}).then(response => {
         console.log(response)
         }).catch(response => {
        console.log("err", response);
       })
MrRefactoring commented 2 years ago

Hi @junip! Thank you for your contribution. I will check it soon

MrRefactoring commented 2 years ago

Hi @junip, I tested your code but didn't get an error. Can you test this small solution on your side? getIssueTesting.zip

MrRefactoring commented 2 years ago

Please let me know if you are still experiencing this problem