#1689 Send notification when closing a ticket and fix the logic around the close_status
Merged by pingou. Opened by pingou.
notif_closing  into  master

Download 1689.patch

It may be easier to review this PR commit by commit, the commit messages contain
the explanation of the change.

This PR fixes:
- https://pagure.io/pagure/issue/1643
- https://pagure.io/pagure/issue/1526

4 new commits added

  • Fix re-setting the close_status to None or reset it when re-opening a ticket
  • Notify the users of status changes on ticket
  • Add a method to notify user of status changes to issues
  • If no assignee is provided, do not try updating the assignee field

rebased

I am guessing this case is for closed as abc -> open. In that case, edit will have close_status in the next if statement, no?
There are three cases in this right? (open -> closed as xyz, closed as xyz -> closed as abc, closed as xyz -> open)

If i am right, then probably the uniquify won't be required.

what happens when we remove an assignee?

I am guessing this case is for closed as abc -> open.

Correct.

In that case, edit will have close_status in the next if statement, no?

In practice most likely, in theory the status could be set to 'Open' and no close_status could be passed. In that case we would not go through the next iteration since close_status would be -1

hm, good question

The reasoning for the change was explained in https://pagure.io/pagure/c/bbb3ce8ce2d6bff03536e862cdd623cc188a0574 let's see if we can improve

Ok, I went the lazy way instead:
if message and message != 'Nothing to change': :)

1 new commit added

  • Allow setting the assignee to None but just discard any un-interested messages

rebased

:thumbsup:

rebased

Thanks for the review :)

Pull-Request has been merged by pingou

Metadata