Page MenuHomePhabricator

Reuse more transaction construction code in bulk editor
ClosedPublic

Authored by epriestley on Jan 19 2018, 1:53 PM.
Tags
None
Referenced Files
F13438369: D18875.id45267.diff
Thu, Jul 11, 9:00 PM
F13435270: D18875.id45267.diff
Thu, Jul 11, 3:36 AM
F13431939: D18875.diff
Wed, Jul 10, 9:30 AM
F13420359: D18875.id45286.diff
Mon, Jul 8, 7:37 AM
F13412441: D18875.diff
Sun, Jul 7, 1:39 AM
F13407517: D18875.diff
Fri, Jul 5, 11:45 PM
F13397688: D18875.id.diff
Thu, Jul 4, 6:23 AM
F13395530: D18875.id45286.diff
Wed, Jul 3, 4:56 PM
Subscribers
None

Details

Summary

Ref T13025. Currently, the bulk editor takes an HTTP request and emits a list of "raw" transactions (simple dictionaries). This goes into the job queue, and the background job builds a real transaction.

However, the logic to turn an HTTP request into a raw transaction is ending up with some duplication, since we generally already have logic to turn an HTTP request into a full object.

Instead: build real objects first, then serialize them to dictionaries. Send those to the job queue, rebuild them into objects again, and we end up in the same spot with a little less code duplication.

Finally, delete the mostly-copied code.

Test Plan

Used bulk editor to add comments, projects, and rename tasks.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable