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
F15424943: D18875.diff
Sun, Mar 23, 1:17 AM
F15418598: D18875.id45267.diff
Fri, Mar 21, 12:22 AM
F15415070: D18875.id45286.diff
Thu, Mar 20, 3:47 AM
F15408756: D18875.id.diff
Wed, Mar 19, 1:06 AM
F15403916: D18875.id45267.diff
Tue, Mar 18, 5:29 AM
F15402359: D18875.diff
Mon, Mar 17, 10:07 PM
Unknown Object (File)
Sun, Mar 2, 6:32 PM
Unknown Object (File)
Thu, Feb 27, 9:41 AM
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