Page MenuHomePhorge

Mark policy transactions of Conduit-created new tasks as such to fix empty Feed transaction entries
Needs ReviewPublic

Authored by aklapper on Sun, May 25, 21:40.

Details

Summary

ManiphestCreateTaskConduitAPIMethod::execute() calls ManiphestConduitAPIMethod::applyRequest().
When viewPolicy or editPolicy parameters are set in the Conduit call, make sure to set ManiphestTransaction::setIsCreateTransaction() so the if ($this->getIsCreateTransaction()) checks in PhabricatorApplicationTransaction::getTitle() behave as expected and $this->getOldValue() does not get called when there is obviously no old value.

This also avoids strncmp() complaining about a null value being passed.

See also similar T15659 or T15679.

ERROR 8192: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/policy/query/PhabricatorPolicyQuery.php:314]

Closes T16085

Test Plan
  • Run echo '{"title":"title", "description":"description", "priority":"50", "viewPolicy":"users", "editPolicy":"users"}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost --conduit-token "cli-xxxxx" maniphest.createtask -- to set a custom Edit Policy
  • Go to http://phorge.localhost/feed/transactions/query/advanced/ and check whether the Transaction column has entries

Diff Detail

Repository
rP Phorge
Branch
T16085strncmpPolicy (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2015
Build 2015: arc lint + arc unit