Page MenuHomePhabricator

PhabricatorProjectQuery()->withDatasourceQuery(SprintConstants::MAGIC_WORD) does not work when special character is not at beginning of string
Closed, ResolvedPublic5 Estimated Story Points

Description

Sprint Project List does not show Sprints that do not have the special character at the beginning of the Project Name

Event Timeline

Christopher raised the priority of this task from to Needs Triage.
Christopher updated the task description. (Show Details)
Christopher subscribed.
Christopher set Security to None.
Christopher edited a custom field.

The problem is the result the withDataSource functionality of PhabricatorProjectQuery that passes a prefix only LIKE clause ( $likes[] = qsprintf($conn_r, 'token.token LIKE %>', $token);)

The fix is to change the qsprint escaper to make a substring like clause with $likes[] = qsprintf($conn_r, 'token.token LIKE %~', $token);

This can be implemented by forking the PhabricatorProjectQuery to SprintProjectQuery.

gerritbot subscribed.

Change 185827 had a related patch set uploaded (by Christopher Johnson (WMDE)):
adds SprintProjectQuery controller

https://gerrit.wikimedia.org/r/185827

Patch-For-Review

Change 185827 merged by Christopher Johnson (WMDE):
adds SprintProjectQuery controller

https://gerrit.wikimedia.org/r/185827