#3816 Fix bug in update_milestones
Merged by pingou. Opened by akanksham.
akanksham/pagure 3716  into  master

Download 3816.patch

Closes issue #3716

Previously, the code was relying on the ordering of the milestone names to map them to fixed date and active attributes.
So the first milestone was mapped to input[name=milestone_date_1], the second to input[name=milestone_date_2] and so on.

When we reorder elements, the name attributes of the date input box and active check box are not changed, so the reported bug occurs.

To fix this, we also tag the milestone name with an index, so now milestone_1_name is always mapped to milestone_1_date and milestone_1_active and similarly for the rest.

rebased onto beccb1a6019d968fc9065087627a0b62f6dad788

Code looks good, but could you revise the commit message to contain the detail you put into this PR?

if milestone and milestone.strip()

Otherwise an empty milestone such as ' ' would pass through

rebased onto e46421b79ab66a211f62f6a1c13ef0f3a10bf9a1

rebased onto fdff56129ac177a97b3c9d1b79a5a680fb00d967

Updated.

@akanksham did you push? It seems your last commit/rebase is 2 days old. Could you rebase once more so we can see what jenkins says

rebased onto d86ac11695ea0761be191051b2bfda18df1c9299

Perfect, I'll test it locally and if all goes well, merge it ;-)

Thanks!

All good for me!

Pull-Request has been merged by pingou

Woohoo, really happy to see this one fixed. :smile:

Metadata