Sort the nested part fields in the correct order on the edit form

Includes integration test for sorting parts