Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parent campaign order being reversed in campaign view
This fixes an issue in Civi 5.7 where the parent campaigns are shown in reversed order on top of the "/campaign/:id/view" view (after "Parent Campaign(s):"). parents is set via crmApi('CampaignTree', 'getparentids', {id: $route.current.params.id}), which already seems to reverse the array order, so we'd reverse to the original order in which root campaigns come last. This was tested against Civi 4.6 and 5.7. Surprisingly, the order was already correct in Civi 4.6. Since the crmApi('CampaignTree') results were the same, I'm assuming the orderBy filter was simply not applied under 4.6, which just happened to make it work. Angular was upgraded from 1.3 to 1.5 between those releases, so it might have been related to that.
- Loading branch information