Skip to content

Conversation

prpht9
Copy link
Owner

@prpht9 prpht9 commented Dec 14, 2022

  • https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html
  • Jira 9.0 moved the parameters on api/2/issue/createmeta into path values
    Need to allow both versions to function
    Need a configuration item to indicate which url/method to call
    Need to write the new method to conform to the new api method format
    Need new jiradata type because the api endpoint changed the output json schema
  • slipstream to create jiradata types
    slipscheme -stdout schema/IssueTypes.json > jiradata/IssueTypes.go
  • config.yml should default to old way
  • add a jira server version variable to config.yml to tell cli which method call to make

@prpht9 prpht9 force-pushed the jira_9_createmeta_api_url_bug branch from 6f55094 to c6c8ff2 Compare December 15, 2022 14:52
 * 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
@tim-goto
Copy link

tim-goto commented Apr 2, 2024

Hey @prpht9 are you still actively using this tool and plan to continue fixint the createmeta change? Otherwise I would start to work on that as well

@prpht9
Copy link
Owner Author

prpht9 commented Apr 2, 2024

@tim-goto I am still actively using the tool daily. This patch works great for me. I was hoping to get some movement on my issue from the upstream repo maintainer(s). But it's just sitting there, I'm guessing abandoned. I don't mind keeping this createmeta part up to date with Jira Server 9.x but I'm not a Golang dev so maintaining the entire app is a bit over my head. If you'd like me to just merge this to my fork, I can do that so we can at least use the master branch for builds. Let me know which way you want to head.

@prpht9
Copy link
Owner Author

prpht9 commented Apr 2, 2024

confirmed working by k-wall in go-jira issue 490. Merging

@prpht9 prpht9 merged commit 7c4bee0 into master Apr 2, 2024
@tim-goto
Copy link

tim-goto commented Apr 2, 2024

Thanks for getting back to me! I think I just had issues with custom fields and I thought your patch is still missing the third part of step 2 Return a list of fields given a project and an issue type as given here. It does work for basic tickets but I had some templating logic that would pre-populate some fields which is currently broken but I guess that is on my end..

@prpht9
Copy link
Owner Author

prpht9 commented Apr 2, 2024

@tim-goto Mine adds custom fields via a $HOME/.jira.d/templates/create and my epics require a name which is a custom field as well. they all work fine. I just created an epic this morning and a customfield_10006: for the epic name was in the template. Haven't even looked at that code since Dec 2022, so can't remember how that works exactly.

@prpht9
Copy link
Owner Author

prpht9 commented Apr 2, 2024

looked at your link and I think my code has fixed that problem.

@tim-goto
Copy link

tim-goto commented Apr 8, 2024

if you don't mind me asking: what does the json template output for jira create? I get the following:

❯ jira create -t json

{
    "meta": {
        "description": "Issue found in Production ",
        "iconUrl": "https://jiraurl.tld/secure/viewavatar?size=xsmall\u0026avatarId=16503\u0026avatarType=issuetype",
        "id": "21",
        "name": "Bug",
        "self": "https://jiraurl.tld/rest/api/2/issuetype/21"
    },
    "overrides": {
        "issuetype": "Bug",
        "login": "myuser",
        "project": "PROJECT"
    }
}

I used to get the entire json with all possible fields and allowed values for that.. Also, which jira version are you on? I am on 9.10.2

@prpht9
Copy link
Owner Author

prpht9 commented Apr 22, 2024

@tim-goto My output is the same as what you posted above. but I think that's because we've overridden the default template. Plus my config file overrides the login and project. We're on Jira v9.2.0. My create template looks like this...

fields:
  project:
    key: SPC
  issuetype:
    name: Task
  summary: >-
    SUMMARY_HERE
  description: >-
    DESCRIPTION_HERE

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.

2 participants