Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR is part of the updates to make CiviHR compatible with CiviCRM 5.7.0. The other part of the work was done in compucorp/civihr#2899.
Technical Details
In CiviHR, we use
hook_civicrm_tabset
in multiple extensions to make sure the tabs in the Contact page will be displayed in some specific order. This order mandates that the "Documents" tab should be displayed after the "Communications" (activities, internally). However, due to a recent cleanup in CiviCRM core, the order of these two items was inverted after upgrading to 5.7.0. The reason is that after the cleanup, the "Communications" tab now has a hardcoded weight of 70 and since the weight of "Documents" was set to 60, it started being display before "Communications". To fix this, I changed the weight to 75, making it greater than 70 but also leaving some room for any other possible items in the future.