Refactor building the data for change of roles of orders for racks.
Adds parameter to new function buildRackOrderRoleChanges