#1255 Allow assignees to drop their own assignment
Closed: Fixed 7 years ago Opened 7 years ago by pfrields.

If I'm assigned an issue, sometimes it may be too hard to complete, or I run out of time. In that case, I'd like to be able to drop an issue, so another contributor can take the assignment.


I'm working on a PR for this, but I need a tiny bit of help understanding how to get the JS for the button to send the right form data to the API. If I read it right, the API does allow one to reset the assignment for an issue (to None).

Pierre provided this patch revision from some initial, flawed work I started:
https://paste.fedoraproject.org/450213/47646127/

I rebased this, but I get errors from runtests.sh:
https://paste.fedoraproject.org/469810/14782025

I assume this is because the API is now passing an ENOCODE error from the new exception raised, as opposed to the fallback EINVALIDREQ? Should I just correct this in test_pagure_flask_api_issue.py file? Or does this really need that plus a brand new test?

Also, it's really sad that it took me 3 months to get to this point. Sorry about that. :grimacing:

Yes, it's hitting that new error handling branch. The test is currently very large and covers many different scenarios. I would prefer to not add to it and instead have a new test function to hit that one new error case.

So the root cause is that the assignee field in the form changed from Required to Optional so indeed, what used to be an invalid request (the assignee field is missing) is no longer invalid.

So the tests will need to be adjusted for this.

Also, it will require a small fix to pagure.lib: http://paste.fedoraproject.org/469824/14782050/

Just to be clear, it's correct for that field to have changed, correct? Since dropping an assignment would be removing the assignee. Or should it stay Required and use '' (empty string) as the value (if that's possible)? Sorry if this is a dumb question.

No it's fine for this field to have changed, I do not think empty string would work on a Required field (I would consider this a bug)

@pingou changed the status to Closed

7 years ago

Login to comment on this ticket.

Metadata