Homestyx hydra
Diffusion hydra d42b3eb0b17a

Fix "Map omits required key" exception by comparing result order against modern…

Description

Fix "Map omits required key" exception by comparing result order against modern field keys

Summary:
Sorting a Maniphest search query by custom fields throws a "Map returned omits required key" exception.

The isCustomFieldOrderKey() check still tested against legacy field key format (for example [custom:]std:maniphest:deadline.due) while the code passes modern field key format (for example custom.deadline.due).

After fixing this, PhutilTypeSpec::checkMap() throws an exception when a non-optional (extra) key $column is in $columns but not in the array of type parameters below to check against:
"Got unexpected parameters: customfield, customfield.index.table, customfield.index.key"
Thus add optional types for customfields in buildPagingClauseFromMultipleColumns() to allow them instead of throwing another exception.

Closes T15631

Test Plan:

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15631

Differential Revision: https://we.phorge.it/D25504

Details

Provenance
Andre KlapperAuthored on Jan 4 2024, 4:16 AM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:328aee033fbd: isSelfURI: fix anchors and relative URIs (that are "self" indeed)
Branches
Unknown
Tags
Unknown

Event Timeline