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.
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 toinput[name=milestone_date_2]and so on.When we reorder elements, the
nameattributes 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_nameis always mapped tomilestone_1_dateandmilestone_1_activeand similarly for the rest.