#1368 Fix removing all the milestones of a project and claiming the milestone of a ticket was changed
Merged by pingou. Opened by pingou.
fix_edit_milestones  into  master

Download 1368.patch

This fixes the behavior we've seen since the last update where we would have fedmsg
notification that the milestone of a ticket was changed, when it wasn't.

In addition, it fixes removing all the milestones of a project in the settings page, effectively
removing the roadmap feature.

rebased

rebased

I don't understand how this code is different from the previous one (about use of raw_data). From this, in case someone comments on the issue: raw_data gives an empty unicode string inside [], which evaluates to True for if condition while data gives the just the unicode string which evaluates to False. In the previous implementation, we used data so, it would evaluate to False and thus new_milestone would be set to None. Check this one. The same thing happens in the new implementation, since, raw_data will be evaluated to True and then same step happens.

Well, the use of raw_data allows getting ride of this https://pagure.io/pagure/pull-request/1368#_1,6 which I think is a good thing.

@pingou , but, if someone enters 'None' in the namespace, raw_data within if will pass and namespace will be set to string None. Where am i wrong in this?

The behavior I was seeing was when no namespace was specified, it would return me a 'None', if the namespace 'None' is specified, then there is nothing we can do indeed :)

This is surprising but, how did it get fixed? because, if it still giving 'None', then it will be stored as 'None'.

ok, I'm going to drop part of this change, I can't reproduce the issue I had anymore :(

1 new commit added

  • Drop the use of form..raw_data since it now seems to work without it

:thumbsup:

Thanks for the review :)

Pull-Request has been merged by pingou

Metadata