Skip to content

fix createmeta issue on jira 9.x - #502

Open
prpht9 wants to merge 1 commit into
go-jira:masterfrom
prpht9:jira_9_createmeta_api_url_bug
Open

fix createmeta issue on jira 9.x#502
prpht9 wants to merge 1 commit into
go-jira:masterfrom
prpht9:jira_9_createmeta_api_url_bug

Conversation

@prpht9

@prpht9 prpht9 commented Apr 2, 2024

Copy link
Copy Markdown

 * Jira changed the format of the call to createmeta

 * config.yml should default to old way
 * add a jira server version variable to config.yml
   to tell cli which method call to make
@jmtd

jmtd commented Apr 8, 2024

Copy link
Copy Markdown

I can't formally review this, but it has fixed the problem for me. From a merging POV, the TODO.md is superfluous, and the additional config value should be documented. I didn't need to set it in order to file an issue, and I'm still unsure what circumstances I'd need to set it and to what.

@darthwalsh

Copy link
Copy Markdown

@prpht9 I was trying out this PR, and hit a small issue with overriding components using jira create.

My jira server (v9.12.12) responded to /rest/api/2/issue/createmeta/ABC/issuetypes without any .allowedValues in the response. I needed to query a specific issue type e.g. /rest/api/2/issue/createmeta/ABC/issuetypes/3 and then .allowedValues showed up for all fields.

This led to the default create template not having any .meta.fields.components.allowedValues , which leads to CLI jira create --override components=Something getting ignored. It's might be fair to call "components gets ignored" a separate preexisting issue, but it's exposed by this PR's fix.

As a workaround, I created a custom creation template that hardcodes

  components:
    - name: {{ .overrides.component }}

@prpht9

prpht9 commented Dec 6, 2024

Copy link
Copy Markdown
Author

@darthwalsh Apologies for the delayed response. I think I had to do something similar but didn't know where to fix this in the repo. I'm not an active golang dev. If you know where to fix this in the code, go ahead and kick up a PR. I'll review it and merge if it pans out.

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

Successfully merging this pull request may close these issues.

3 participants