-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PCHR-4473: Run tests on CiviCRM 5.12.0 #2983
Draft
davialexandre
wants to merge
40
commits into
master
Choose a base branch
from
PCHR-4473-civicrm-5.12-upgrade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…st::retrieve() The main reason for this is that `$this` was being passed as the store param in places that we didn't have a context object (i.e. outside of a instance method). Up to PHP 7.0, this would work without a problem, but starting from PHP 7.1, this now results in an error: https://3v4l.org/QXYLB In a few places, instead of $this, `CRM_Core_DAO::$_nullObject` was being used. This is a risky approach, as it's possible for $_nullObject to not be null (it is just an public static property of the DAO class). This has been removed as well
…ript PCHR-3681: Remove unnecessary param in calls to CRM_Utils_Request::retrieve()
…FullDetails API This API call is an optimized way to fetch all the information for a Job Contract, which is stored in multiple different database tables. It does that by running a single SQL query, joining all the tables and the necessary fields. In the resultset, in order to differentiate which field belongs to which entity, each field is prefixed with the entity name (examplei: details__<field_name>). After the data is fetched from the database, the `HRJobContractRevision::normalizeFullDetailsResult()` was used to loop through all the fields in the resultset, detect to which entity they belong to and organize the data in a proper way. Besides the fields returned by the query, the resultset object also contains some internal fields. In the past, all of these fields were prefixed with an underscore, but on civicrm/civicrm-core#12276 a new `resultCopies` field was added, and since it does not start with an underscore, the logic to filter out the internal fields stopped working. To fix that, instead of looping through all of the fields from the resultset, we call the `toArray()` method which will return a list of fields and values containing only those returned by the SQL query.
In civicrm/civicrm-core@4aced66, the Summary.tpl file has been refactored in core and part of it was extracted to the Basic.tpl template. Our customization was located exactly in the piece of code that has been extracted, so the sync was done by: - Overridding the Basic.tpl template in hrui - Moving the custom code from the Summary.tpl file to the new Basic.tpl one - Deleting the old Summary.tpl file, as it didn't contain any custom code anymore As part of this, I also did some small refactoring in the custom code, removing some unecessary ifs and custom variables to make it less different from the original file as possible
The only reason we needed the overridden file was to fix an error in CiviCRM Core. Since this has been now fixed in core, we don't need to file anymore. References: civicrm/civicrm-core#13031 compucorp/civicrm-core#28
…arning PCHR-4426: Fix warning on the Work Patterns list page
Due to the difference in how PHP 7 handles variable variables, a couple of notices about undefined variables and invalid function names started appearing on the L&A settings page. This PR fixes the issue by simplifying how we call the method in the html_type setting.
…rror PCHR-4441: Fix errors on the L&A settings page
Now that the final version has been released, we don't need to use the branch version anymore
PCHR-4346: CiviCRM Upgrade
PCHR-4446: Fix Expected Variable Reference Warning
…-errors PCHR-4448: Fix Warning and Notice Messages on Import Job Contract Wizard
In Civi 5.8, some new default icons were added by default to the tabs and they don't match the ones used by CiviHR. With the tabset hook, we can make each extension declare which icon to use for its tab.
…nto PCHR-4473-civicrm-5.12-upgrade
Since CiviCRM 5.8, the tabs now have icons by default. Some of them are different from the ones used in CiviHR so we have to customize them to the ones we want. The tabset hook was used to set the custom icons. For icons in core tabs, the hrcore does the customization. For the other tabs, the customization was done in the extension the tab belongs to. As part of the change in core to support those icons, they also changed the markup of the tab and now the label/title is wrapped around a `span` tag. This change broke some javascript code in the hrui extension that was renaming the title of the summary tab to "Personal Details", as the jQuery code used there was not aware of the span and was replacing the entire tab text instead of only the span, resulting in it removing the icon. This was fixed by using the tabset in hrcore to replace the text. This way, even if the markup changes again in the future, the replacement will still work
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
WIP