Page MenuHomeDevCentral

Refactor the projects list storage in PhabricatorStory
ClosedPublic

Authored by dereckson on Dec 25 2015, 20:35.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 15:06
Unknown Object (File)
Thu, Nov 7, 10:43
Unknown Object (File)
Thu, Nov 7, 10:31
Unknown Object (File)
Wed, Nov 6, 00:27
Unknown Object (File)
Thu, Oct 31, 06:06
Unknown Object (File)
Tue, Oct 29, 05:12
Unknown Object (File)
Sun, Oct 27, 18:10
Unknown Object (File)
Sun, Oct 20, 12:41
Subscribers
None

Details

Summary

To get the projects attached to a story, up to 3 API calls are needed.

In the previous code iteration, we stored the list of projects in the
event, and then in the notification, but this doesn't respect the
single responsability principle.

We so provide two new methods, getProjects() and attachProjects() to
maintain the current way of querying only once the projects list, and
to store once queried the list inside PhabricatorStory.

Cleaning code where the projects array were copied and passed along.

Test Plan

Replay Phabricator former requests in Runscope

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson retitled this revision from to Refactor the projects list storage in PhabricatorStory.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson edited edge metadata.
This revision is now accepted and ready to land.Dec 25 2015, 20:41
This revision was automatically updated to reflect the committed changes.