trentm / jirash

CLI and (light) shell for Jira
Other
79 stars 13 forks source link

createissue: support additional fields #15

Closed zenogantner closed 4 years ago

zenogantner commented 11 years ago

When trying to create an issue with our JIRA, I get the following error:

Traceback (most recent call last): ... Fault: <Fault 0: 'java.lang.Exception: com.atlassian.jira.rpc.exception.RemoteValidationException: {customfield_10620=QA status is required.} : []'>

It would be nice if one could specify values for arbitrary fields, e.g. -f "QA status: Test case exists"

trentm commented 11 years ago

Agreed. Also would be nice to be able to put something in one's ~/.jirash.json config to say which fields you'd like 'jirash createissue ...' to always prompt on. Then you don't have to type the "QA Status" everytime.

Patches welcome, of course. :)

trentm commented 11 years ago

One problem is knowing what form to specify those values in the rIssueStruct to https://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/xmlrpc/XmlRpcService.html#createIssue%28java.lang.String,%20java.util.Hashtable%29

An example from the current do_createissue:

            component_ids = [self.jira.component_id(project_key, s)
                for s in opts.components]
            data["components"] = [{"id": cid} for cid in component_ids]

That is based on the "getComponents" API call https://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/xmlrpc/XmlRpcService.html#getComponents%28java.lang.String,%20java.lang.String%29

I'm not sure about getting ids for and setting ids for custom fields (which I presume your QA status is).

trentm commented 4 years ago

I think like the feature idea, but (a) this is really old now and (b) I won't have time to implement this myself, so I'm closing this. If someone is willing, then I'd look at a PR.