Page MenuHomeDevCentral

Refactor the projects list storage in PhabricatorStory
ClosedPublic

Authored by dereckson on Dec 25 2015, 20:35.
Tags
None
Referenced Files
F11491222: D124.id294.diff
Thu, Aug 28, 07:04
Unknown Object (File)
Tue, Aug 26, 05:27
Unknown Object (File)
Mon, Aug 25, 08:41
Unknown Object (File)
Sun, Aug 24, 18:50
Unknown Object (File)
Sat, Aug 23, 01:08
Unknown Object (File)
Mon, Aug 18, 10:38
Unknown Object (File)
Mon, Aug 18, 09:41
Unknown Object (File)
Sun, Aug 17, 16:01
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.