#1521 Lets a issue submitter close his/her issue
Merged by pingou. Opened by rahulbajaj.
rahulbajaj/pagure OptionToCloseIssue  into  master

Download 1521.patch

As the creator of a pr can close his pr (may be once he understands that his pr is already dealt with or maybe his pr is not valid), we must also have a option for closing the issue.

If the issuer has a doubt and has posted an issue and if his doubt is solved, he might as well close his issue. By doing so, we can reduce the number of open issues.

rebased

rebased

:thumbsdown: on allowing regular user to delete their ticket.

That doesn't seem to be sufficient, I can't edit the metadata and thus can't change the status.

Why not, i guess that was the whole point. If a regular user creates an issue and then certainly decides that his/her issue has been already reported/solved he might as well close his issue :)

Closing is different from deleting.

rebased

This confuses me, what is happening in this section of the code?

I'm reviewing the changes, then trying them locally and that raises a question to me: could you tell me how you tested this change?

@pingou Hey, so I made two users say X and Y.

X creates a project say 'new_project' and Y creates an issue in the 'new_project'. Now, according to this pr, Y gets access to edit-metadata to close his pr.

I have tested it on my local instance. Am I going in the wrong direction ?

Could Y actually close the ticket?

We're talking about tickets here not PR :)

In edit-metadata also I have given user Y access to only 'status', 'closed as' and 'edit metadata button '.

I am sorry by mistake I wrote 'pr' in the previous comment.

@pingou let me test it again and I shall attach some screenshots with it. As far as I had tested it, Y was able to close the issue :)

1 new commit added

  • Update edit-metadata

rebased

@pingou : looking better ?

typo: thier vs their

1 new commit added

  • some changes

rebased

Code wise this looks ok but this really needs:

a) unit-tests (I am really not thrilled by the idea of merging this without unit-tests)
b) some refactoring of the code, but that's something we should do in another PR

Ok, I'm going to merge this as is and open a new PR with the unit-tests

Pull-Request has been merged by pingou

Thanks @pingou :)

Metadata