Merge pull request #15829 from eileenmcnaughton/dedupe3
[civicrm-core.git] / release-notes / 5.22.0.md
1 # CiviCRM 5.22.0
2
3 Released February 5, 2020
4
5 - **[Synopsis](#synopsis)**
6 - **[Features](#features)**
7 - **[Bugs resolved](#bugs)**
8 - **[Miscellany](#misc)**
9 - **[Credits](#credits)**
10 - **[Feedback](#feedback)**
11
12 ## <a name="synopsis"></a>Synopsis
13
14 | *Does this version...?* | |
15 |:--------------------------------------------------------------- |:-------:|
16 | Fix security vulnerabilities? | no |
17 | **Change the database schema?** | **yes** |
18 | **Alter the API?** | **yes** |
19 | Require attention to configuration options? | no |
20 | Fix problems installing or upgrading to a previous version? | no |
21 | **Introduce features?** | **yes** |
22 | **Fix bugs?** | **yes** |
23
24 ## <a name="features"></a>Features
25
26 ### Core CiviCRM
27
28 - **Field Names now Reserved Words in MySQL8
29 ([dev/core#1143](https://lab.civicrm.org/dev/core/issues/1143),
30 [dev/core#1144](https://lab.civicrm.org/dev/core/issues/1144) and
31 [dev/core#1480](https://lab.civicrm.org/dev/core/issues/1480):
32 [16179](https://github.com/civicrm/civicrm-core/pull/16179) and
33 [16182](https://github.com/civicrm/civicrm-core/pull/16182))**
34
35 Allows CiviCRM installations to run on MySQL8 and updates the test
36 infastructure to support MySQL8.
37
38 - **Add controlField metadata for ChainSelect fields
39 ([16164](https://github.com/civicrm/civicrm-core/pull/16164))**
40
41 Adds additional field metadata for state/province and county address fields
42 for the sake of autogenerated forms (afform).
43
44 - **Allow Angular modules to provide dynamic HTML snippets
45 ([16078](https://github.com/civicrm/civicrm-core/pull/16078))**
46
47 Supports afforms dynamic templates by allowing angular partials to be passed
48 as strings not just file paths.
49
50 - **Allow values to be passed to api4 GetFields
51 ([16154](https://github.com/civicrm/civicrm-core/pull/16154) and
52 [16162](https://github.com/civicrm/civicrm-core/pull/16162))**
53
54 Makes it possible to filter api4 `getFields` calls by contact
55 type, only returning custom fields appropriate to certain contact types.
56
57 - **Pass api4 getFields values through to getOptions
58 ([16168](https://github.com/civicrm/civicrm-core/pull/16168))**
59
60 Allows option filtering in api4, similar to how it works in api3.
61
62 - **Add api to check for missing indices
63 ([16145](https://github.com/civicrm/civicrm-core/pull/16145))**
64
65 Adds an api to check for missing mysql indices.
66
67 - **Add in Country and StateProvince APIv4 Entities
68 ([16110](https://github.com/civicrm/civicrm-core/pull/16110))**
69
70 Adds Country and StateProvince APIv4 Entities.
71
72 - **Replace all instances of CRM_Core_Fatal with throw new CRM_Core_Exception
73 (Work Towards [dev/core#560](https://lab.civicrm.org/dev/core/issues/560):
74 [16141](https://github.com/civicrm/civicrm-core/pull/16141) and
75 [16067](https://github.com/civicrm/civicrm-core/pull/16067))**
76
77 Work towards throwing exceptions (instead of fatal errors).
78
79 - **Deadlocked queries cause an instant error for end-users, but are retried in
80 other circumstances (Work Towards
81 [dev/core#395](https://lab.civicrm.org/dev/core/issues/395):
82 [275](https://github.com/civicrm/civicrm-packages/pull/275) and
83 [16143](https://github.com/civicrm/civicrm-core/pull/16143))**
84
85 Improves logging from deadlocks specifically, before this change an error
86 recorded because of a deadlock query was recorded as "DBError::Unknown Error"
87 now they are recorded as "DBError::deadlock".
88
89 ### CiviContribute
90
91 - **We should give user feedback in case of a Payment Processor Exception
92 ([15676](https://github.com/civicrm/civicrm-core/pull/15676))**
93
94 Improves user experience when updating or canceling a recurring payment by
95 displaying any error message sent from the payment processor to the user.
96
97 - **Code cleanup Update Paypal invokeApi to only throw exceptions.
98 ([16072](https://github.com/civicrm/civicrm-core/pull/16072))**
99
100 Standardizes and improves error handling within PayPal.
101
102 ## <a name="bugs"></a>Bugs resolved
103
104 ### Core CiviCRM
105
106 - **CIVI-SA-2019-21 may lead to regressions when following typehints on
107 CRM_Core_BAO_Setting::setItem()
108 ([dev/core#1425](https://lab.civicrm.org/dev/core/issues/1425):
109 [15975](https://github.com/civicrm/civicrm-core/pull/15975))**
110
111 Deprecates old setItem & setOptionValue functions on
112 BAO_Setting to prevent regressions.
113
114 - **Deadlocks on acl_cache (Work Towards
115 [dev/core#1486](https://lab.civicrm.org/dev/core/issues/1486):
116 [16144](https://github.com/civicrm/civicrm-core/pull/16144))**
117
118 Adds an index to the `civicrm_acl_cache.modified_date` column to reduce
119 deadlocks when running the ACL Cache.
120
121 - **Port "+options" for constant-parameters to APIv4-PHP (Work Towards
122 [dev/core#1489](https://lab.civicrm.org/dev/core/issues/1489):
123 [16149](https://github.com/civicrm/civicrm-core/pull/16149))**
124
125 Ensures managed entities are not reconciled during upgrades.
126
127 - **Api4 - Fix auto serialize array input for CheckBox/MultiSelect fields
128 ([16152](https://github.com/civicrm/civicrm-core/pull/16152))**
129
130 In Api4, serialized fields should input/output as array data. This wasn't
131 working on the input side for custom entities. This fixes array input handling
132 and adds test coverage.
133
134 - **Fix output display in api4 explorer
135 ([16130](https://github.com/civicrm/civicrm-core/pull/16130))**
136
137 Ensures api4 explorer displays output with html entities properly.
138
139 - **Add in searchFieldMetadata for contact_tags, contact_type, group and
140 deleted_contacts fields for contribute, pledge searches
141 ([15942](https://github.com/civicrm/civicrm-core/pull/15942))**
142
143 Adds url support on search forms (other than the search builder) for the
144 following fields: `contact_tags`, `contact_type`, `group` and
145 `deleted_contacts`.
146
147 - **Update Smart Group form uses different labels for Group Title and Group
148 Description ([16042](https://github.com/civicrm/civicrm-core/pull/16042))**
149
150 Improves user experience by making the Smart Group field labels on the
151 Advanced Search from match the labels used on the Smart Group edit form.
152
153 - **Update Smart Group form unsets the existing Group Types
154 ([16043](https://github.com/civicrm/civicrm-core/pull/16043))**
155
156 Ensures the Mailing List group type remains set on the Update Smart Group
157 form.
158
159 - **Activity type listing shows name instead label
160 ([dev/core#1470](https://lab.civicrm.org/dev/core/issues/1470):
161 [16094](https://github.com/civicrm/civicrm-core/pull/16094))**
162
163 - **Export doesn't work in Excel with diacritic chars
164 ([dev/core#1424](https://lab.civicrm.org/dev/core/issues/1424):
165 [16117](https://github.com/civicrm/civicrm-core/pull/16117) and
166 [15968](https://github.com/civicrm/civicrm-core/pull/15968))**
167
168 - **text missing from email column when custom search profile is used
169 in Advanced Search
170 ([dev/core#1474](https://lab.civicrm.org/dev/core/issues/1474):
171 [16101](https://github.com/civicrm/civicrm-core/pull/16101))**
172
173 ### CiviCase
174
175 - **Add case activity action links to activity report
176 ([15135](https://github.com/civicrm/civicrm-core/pull/15135))**
177
178 Ensures if an activity is linked to a case the "case activity" actions are
179 displayed instead of the standard activity actions (eg. move/copy to case
180 instead of file on case).
181
182 - **Case Detail 'Active Role?' filter excludes cases without relationships
183 ([dev/report#24](https://lab.civicrm.org/dev/report/issues/24):
184 [15972](https://github.com/civicrm/civicrm-core/pull/15972))**
185
186 - **Manager/Creator Information not being returned for case related contacts
187 when fetching Case Details
188 ([dev/core#1426](https://lab.civicrm.org/dev/core/issues/1426):
189 [16006](https://github.com/civicrm/civicrm-core/pull/16006))**
190
191 ### CiviContribute
192
193 - **Thousands-separator corrupts price field values (comma)
194 ([dev/core#1472](https://lab.civicrm.org/dev/core/issues/1472):
195 [16111](https://github.com/civicrm/civicrm-core/pull/16111))**
196
197 Fixes a bug where price options with thousands operators didn't submit
198 correctly.
199
200 - **E notice fix on Price set form
201 ([16096](https://github.com/civicrm/civicrm-core/pull/16096))**
202
203 Removes an e notice when submitting the price set form.
204
205 - **Advanced search fails to properly search for contribution source
206 ([dev/core#1468](https://lab.civicrm.org/dev/core/issues/1468):
207 [16083](https://github.com/civicrm/civicrm-core/pull/16083))**
208
209 ### CiviEvent
210
211 - **Event Participants actions (Print Name Badges, Export...) ignores search
212 criteria ([dev/core#1422](https://lab.civicrm.org/dev/core/issues/1422):
213 [16038](https://github.com/civicrm/civicrm-core/pull/16038))**
214
215 Ensures that the actions menu on the participant search form respects search
216 criteria.
217
218 ### CiviMember
219
220 - **Fix js error on choosing membership type
221 ([16058](https://github.com/civicrm/civicrm-core/pull/16058))**
222
223 Fixes a javascript error "Uncaught ReferenceError" when choosing a membership
224 type from the backend membership signup form.
225
226 ### Drupal Integration
227
228 - **Error when creating user record for Civi contact
229 ([dev/drupal#99](https://lab.civicrm.org/dev/drupal/issues/99):
230 [16157](https://github.com/civicrm/civicrm-core/pull/16157))**
231
232 Fixes an E-notice "Notice: Trying to get property 'id' of non-object in
233 CRM_Core_BAO_UFMatch::updateContactEmail() (line 449 of
234 /var/www/sitename/vendor/civicrm/civicrm-core/CRM/Core/BAO/UFMatch.php)." when
235 submitting the "Create User Record" form which can be found from the "Actions"
236 menu-button while viewing a CRM contact.
237
238 - **Missing address on `/user` when location type label differs from its name
239 ([dev/core#1473](https://lab.civicrm.org/dev/core/issues/1473):
240 [16100](https://github.com/civicrm/civicrm-core/pull/16100))**
241
242 ### Wordpress Integration
243
244 - **Fix basepage title for Yoast SEO when theme declares "title-tag" support
245 ([174](https://github.com/civicrm/civicrm-wordpress/pull/174))**
246
247 Fixes a bug for sites with the Yoast SEO plugin where the CiviCRM page title
248 was not being displayed properly. Specifically the Yoast SEO plugin
249 short-circuits the code in `wp_get_document_title()` by filtering via
250 `pre_get_document_title`. This means that the CiviCRM code to apply the
251 CiviCRM basepage title via the document_title_parts filter is never reached
252 and the basepage title does not reflect the CiviCRM content.
253
254 ## <a name="misc"></a>Miscellany
255
256 - **Fix typo, Mailign should be Mailing
257 ([16031](https://github.com/civicrm/civicrm-core/pull/16031))**
258
259 - **Switch static var to using Civi::statics
260 ([16138](https://github.com/civicrm/civicrm-core/pull/16138))**
261
262 - **Remove code to create a subscription history entry when a contact is created
263 ([dev/core#1482](https://lab.civicrm.org/dev/core/issues/1482):
264 [16125](https://github.com/civicrm/civicrm-core/pull/16125))**
265
266 - **Remove unnecessary query when updating org, if no name update.
267 ([16080](https://github.com/civicrm/civicrm-core/pull/16080))**
268
269 - **Remove unnecessary, and possibly incorrect query from email update
270 ([16079](https://github.com/civicrm/civicrm-core/pull/16079))**
271
272 - **Remove unneeded zendframwork/zend-validator and zendframwork/zend-stdlib
273 packages as not required by any other package
274 ([16112](https://github.com/civicrm/civicrm-core/pull/16112))**
275
276 - **Remove legacy_redirect_path handling
277 ([16134](https://github.com/civicrm/civicrm-core/pull/16134))**
278
279 - **Remove function marked as deprecated & unused by core nearly a year ago
280 ([16124](https://github.com/civicrm/civicrm-core/pull/16124))**
281
282 - **Remove vestige of apiv2
283 ([16115](https://github.com/civicrm/civicrm-core/pull/16115))**
284
285 - **Remove PEAR package Structures_Graph as there appears to be no use for it
286 ([279](https://github.com/civicrm/civicrm-packages/pull/279))**
287
288 - **Remove Net_UserAgent_Detect package
289 ([272](https://github.com/civicrm/civicrm-packages/pull/272))**
290
291 - **Paypal class cleanup
292 ([16088](https://github.com/civicrm/civicrm-core/pull/16088))**
293
294 - **2020 test fixes.
295 ([16172](https://github.com/civicrm/civicrm-core/pull/16172))**
296
297 - **Unit test for https://github.com/civicrm/civicrm-core/pull/16120
298 ([16127](https://github.com/civicrm/civicrm-core/pull/16127))**
299
300 - **Update unit tests to use name spaced format of phpunit test classes for
301 phpunit6 compatability
302 ([594](https://github.com/civicrm/civicrm-drupal/pull/594))**
303
304 - **Update to use the namespaced version of the PHPUnit test classes as this
305 will work for phpunit6 going forward as well as phpunit5
306 ([175](https://github.com/civicrm/civicrm-wordpress/pull/175))**
307
308 - **Update PHPUnit Test class declarations to use namespaced format for phpunit6
309 compatability ([108](https://github.com/civicrm/civicrm-backdrop/pull/108))**
310
311 - **[REF] Minor cleanup - declare exceptions, use single quotes, strict
312 comparison ([16137](https://github.com/civicrm/civicrm-core/pull/16137))**
313
314 - **[REF] remove CRM_Core_Error check
315 ([16136](https://github.com/civicrm/civicrm-core/pull/16136))**
316
317 - **[REF] Convert more petition signature fatals to status bounce
318 ([16075](https://github.com/civicrm/civicrm-core/pull/16075))**
319
320 - **[REF] Switch CRM_Utils_Error::fatal calls for CRM_Core_Exception in Grant.
321 utils, bin/ and Civi/Angular/ folders
322 ([16109](https://github.com/civicrm/civicrm-core/pull/16109))**
323
324 - **[REF] Minor simplification on additional_participants checks
325 ([16056](https://github.com/civicrm/civicrm-core/pull/16056))**
326
327 - **[REF] Refactor Contact Search form to use standardised getSortID function
328 ([16054](https://github.com/civicrm/civicrm-core/pull/16054))**
329
330 - **[REF] Refactor Activity Search to use parent getSortID function
331 ([16053](https://github.com/civicrm/civicrm-core/pull/16053))**
332
333 - **[REF] Refactor Campaign Search form to use standardised getSortID function
334 ([16055](https://github.com/civicrm/civicrm-core/pull/16055))**
335
336 - **[REF] Move wrangling of Front end form contribution param for autoRenew back
337 to form ([15927](https://github.com/civicrm/civicrm-core/pull/15927))**
338
339 - **[REF] Replace Deprecated function CRM_Core_BAO_Setting::setItem with the
340 relevant Civi::contactSettings function
341 ([16044](https://github.com/civicrm/civicrm-core/pull/16044))**
342
343 - **[REF] remove unused from getACLRoles
344 ([16180](https://github.com/civicrm/civicrm-core/pull/16180))**
345
346 - **[REF] simplify recordAdjustedAmt function
347 ([16135](https://github.com/civicrm/civicrm-core/pull/16135))**
348
349 - **[REF] extract member form batch update & add test
350 ([16151](https://github.com/civicrm/civicrm-core/pull/16151))**
351
352 - **[REF] Remove unused params from function signature for getACLs
353 ([16175](https://github.com/civicrm/civicrm-core/pull/16175))**
354
355 - **[REF] step towards wiping out $ids array in membership bao functions
356 ([16132](https://github.com/civicrm/civicrm-core/pull/16132))**
357
358 - **[Ref] improve readability of acl code
359 ([16131](https://github.com/civicrm/civicrm-core/pull/16131))**
360
361 - **[Ref] Remove php4 support from BAO_Acl class
362 ([16119](https://github.com/civicrm/civicrm-core/pull/16119))**
363
364 - **[NFC] Test clean up.
365 ([16133](https://github.com/civicrm/civicrm-core/pull/16133))**
366
367 - **[NFC] cleanup to declared exceptions, quotes, strict mode.
368 ([16114](https://github.com/civicrm/civicrm-core/pull/16114))**
369
370 - **[NFC] Declare exceptions, use single quotes where possible, use strict
371 comparison ([16142](https://github.com/civicrm/civicrm-core/pull/16142))**
372
373 - **[NFC] Add in unit test for dev/core#1460
374 ([16063](https://github.com/civicrm/civicrm-core/pull/16063))**
375
376 - **[NFC] code cleanup
377 ([16050](https://github.com/civicrm/civicrm-core/pull/16050))**
378
379 - **[NFC] Add in a unit test of passing an array into the Civi::settings set
380 facade and getting it back
381 ([16045](https://github.com/civicrm/civicrm-core/pull/16045))**
382
383 - **[NFC] Add test on buildMembershipTypeValues & cleanup class
384 ([16167](https://github.com/civicrm/civicrm-core/pull/16167))**
385
386 - **[NFC] Re-generate DAOs
387 ([16178](https://github.com/civicrm/civicrm-core/pull/16178))**
388
389 - **[NFC] Extract duplicated code lines in test
390 ([16165](https://github.com/civicrm/civicrm-core/pull/16165))**
391
392 - **[NFC] Clean up unit test
393 ([16163](https://github.com/civicrm/civicrm-core/pull/16163))**
394
395 - **[NFC] If statement is always true
396 ([16122](https://github.com/civicrm/civicrm-core/pull/16122))**
397
398 ## <a name="credits"></a>Credits
399
400 This release was developed by the following code authors:
401
402 AGH Strategies - Andrew Hunt; Agileware - Justin Freeman; Australian Greens -
403 Seamus Lee; Christian Wach; Circle Interactive - Pradeep Nayak; CiviCRM -
404 Coleman Watts, Tim Otten; Coop SymbioTIC - Mathieu Lutfy; Dave D; Fuzion -
405 Jitendra Purohit; MJW Consulting - Matthew Wire; Squiffle Consulting - Aidan
406 Saunders; Wikimedia Foundation - Eileen McNaughton
407
408 Most authors also reviewed code for this release; in addition, the following
409 reviewers contributed their comments:
410
411 AGH Strategies - Alice Frumin; Artful Robot - Rich Lott; CiviDesk - Yashodha
412 Chaku; Joinery - Allen Shaw; Megaphone Technology Consulting - Jon Goldberg;
413 Tadpole Collective - Kevin Cristiano;
414
415 ## <a name="feedback"></a>Feedback
416
417 These release notes are edited by Alice Frumin and Andrew Hunt. If you'd like
418 to provide feedback on them, please log in to https://chat.civicrm.org/civicrm
419 and contact `@agh1`.