@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix ContainsConstraints for array-valued custom field constraints in "*.search" methods

Summary: Fixes T11593. We ask for a list of values when searching for custom "link" fields, but don't handle it correctly when actually construcitng a query.

Test Plan:
Added this custom field:

```
{
"mycompany.target-version": {
"name": "Target Version",
"type": "link",
"search": true
}
}
```

Set a task to "beta". Let daemons index it. Queried for:

```
constraints: {
"custom.mycompany.target-version": [
"beta"
]
}
```

Got just one result back.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11593

Differential Revision: https://secure.phabricator.com/D16508

+6 -1
+6 -1
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldLink.php
··· 47 47 PhabricatorCursorPagedPolicyAwareQuery $query, 48 48 $value) { 49 49 50 - if (strlen($value)) { 50 + if (is_string($value) && !strlen($value)) { 51 + return; 52 + } 53 + 54 + $value = (array)$value; 55 + if ($value) { 51 56 $query->withApplicationSearchContainsConstraint( 52 57 $this->newStringIndex(null), 53 58 $value);