Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to unassign an issue #80

Closed
jamime opened this issue May 4, 2017 · 6 comments
Closed

Not possible to unassign an issue #80

jamime opened this issue May 4, 2017 · 6 comments

Comments

@jamime
Copy link

jamime commented May 4, 2017

It is not possible to set the issue to unassigned (a null value)
https://confluence.atlassian.com/jirakb/how-to-set-assignee-to-unassigned-via-rest-api-in-jira-744721880.html

@coryb
Copy link
Contributor

coryb commented May 4, 2017

Nice, thanks for the link, I was wondering how to do that. Sounds like a hacky work around for now you can run jira give ISSUE -1 which should set the assignee to Unassigned if that document is correct.

@jamime
Copy link
Author

jamime commented May 9, 2017

@coryb Unfortunatly jira give ISSUE -1 does not work (Unknown option -1). But also, when a component has a assigned lead -1 wouldn't unassigned the issue, only re-assign it to the component lead.

@coryb
Copy link
Contributor

coryb commented May 9, 2017

Okay, I played around a bit and did not get anything useful to work. I will see what I can find to make this work.

@coryb
Copy link
Contributor

coryb commented May 10, 2017

I did get the -1 to work though, but you need the -- option for jira to prevent the -1 from being parsed as an option, so this worked for me:

jira give ISSUE -- -1

The command looks like nonsense, so we still need to work on usability for that. Perhaps I will make a default user map to -1 automatically. So I will probably make this work:

jira give ISSUE default

I think the Atlassian document you linked to is partially wrong though. For a project that has a default assignee I tried sending {"name": ""} which results in an error:

{"errorMessages":[],"errors":{"assignee":"User '' does not exist."}}

It does seem to work if you send {"name": null} though. I am not sure what the jira command would look like for this though, perhaps:

jira give ISSUE unassigned

or

jira unassign ISSUE

@jamime
Copy link
Author

jamime commented May 10, 2017

I'm not sure what would happen if the system had a user with the username 'default', so I think it would be better as a command for both of these tasks.
I like jira unassign ISSUE and possibly jira default ISSUE.

@coryb
Copy link
Contributor

coryb commented May 10, 2017

Okay, I have added commands for:

jira unassign ISSUE

and

jira give ISSUE --default

I thought having a default command would probably be pretty confusing.

You can download the latest release here: https://github.com/Netflix-Skunkworks/go-jira/releases/tag/v0.1.14

@coryb coryb closed this as completed May 10, 2017
pdericson pushed a commit to pdericson/go-jira that referenced this issue Sep 14, 2017
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

No branches or pull requests

2 participants