go-jira icon indicating copy to clipboard operation
go-jira copied to clipboard

Added POST search & updated GET search for latest api version

Open Fank opened this issue 2 years ago • 2 comments

What type of PR is this?

  • feature

What this PR does / why we need it:

Added POST search function in cloud. General cleanup of the issue search in cloud.

Which issue(s) this PR fixes:

Fixes #395 Related #390

Special notes for your reviewer:

The search returns now the original json as struct instead of issue array and the issue array is untouched, marked as TODO for later fixes because it uses the wrong type as defined in documentation. JQL is now inside the options block because both GET & POST are using this for building the URL as for JSON.

Additional documentation e.g., usage docs, etc.:

Fank avatar Dec 16 '22 13:12 Fank

One of the main issues i was running into is that a major change between current v2 and new v3 in the API version is the issue field description which changed from a string into an unknown type.

v2:

"description": "dsffdsfd",

v3:

"description": {
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "dsffdsfd"
        }
      ]
    }
  ]
},

Which causes a lot of issues with the struct IssueFields because it needs to be changed in all occurrences.

Fank avatar Dec 21 '22 09:12 Fank

Thanks @Fank! I will check it out in the next days. Happy Xmas

andygrunwald avatar Dec 26 '22 08:12 andygrunwald