-
Notifications
You must be signed in to change notification settings - Fork 0
Implement owner-invoice saveDraft + addLines from Cabbaroo Save capture - #20
Draft
BuildCal wants to merge 3 commits into
Draft
Implement owner-invoice saveDraft + addLines from Cabbaroo Save capture #20BuildCal wants to merge 3 commits into
BuildCal wants to merge 3 commits into
Conversation
Dedicated-profile capture of the draft UI redirected to Auth0. No Save click and no EntityAttachmentsToInvoice request. Keep write verbs locked until a signed-in gateway session fires them. Do not invent PUT bodies. Co-authored-by: Brad Caldon <BuildCal@users.noreply.github.com>
Cabbaroo draft 18059815 Save fired PUT /apix/v3/Invoices/save-invoice (application/merge-patch+json). addLines uses the same Save with lineItems/ownerInvoiceLineItems; related picker GET is EntityLineItemsToInvoice. Force draft flags; never Send.
@BuildCal
BuildCal
changed the title
(削除) Leave owner-invoice Save and addLines not_captured (auth_required) (削除ここまで)
(追記) Implement owner-invoice saveDraft + addLines from Cabbaroo Save capture (追記ここまで)
Sep 4, 2026
BuildCal
BuildCal
commented
Sep 4, 2026
@BuildCal
BuildCal
left a comment
Owner
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CTO review — COMMENT (approve-ready after undraft)
HEAD 9ecbbce · CI Gateway / Web / BT Service all green · mergeable · still DRAFT
Verdict
Approve-ready for Brad to merge after undraft. Capture + implementation look right. CTO does not merge.
What landed
- Real Cabbaroo Save capture:
PUT /apix/v3/Invoices/save-invoicewithapplication/merge-patch+json invoices.saveDraft/invoices.addLinesmarked captured; write path + conflict GET/guardConflict- Forced draft locks on every write:
notifyOwnerfalse,createInvoiceChkboxfalse,status1 (Draft) invoices.sendremains send-locked; tests cover dry_run no longernot_capturedand PUT flags/line merge- Related picker noted as
GET /api/LineItems/EntityLineItemsToInvoice(not the write)
Nits (non-blocking)
- CHANGELOG still says saveDraft/addLines stay
not_captured(auth_required note from the earlier commit). Flip that to Added/Changed for the 4 Sep capture before or right after merge. buildertrend-api-map.mdtable says addLines captured, but a later paragraph still saysinvoices.addLines / EntityAttachmentsToInvoice still not_captured(and typo Cubbaroo). Align the prose with the table.invoiceSaveDraftPayloaddoes not seed from current invoice (merge-patch sparse is fine). Callers must put needed fields inheader/body; empty header only forces id/job/draft flags — intentional, just worth knowing for the first live sandbox Save.
Ship notes
- Keep
BT_GATEWAY_ENABLE_SEND=false. Never Send / pay / notify. - Prefer a sandbox draft for any live Save; avoid hammering Cabbaroo
18059815/ job41648716while Ops is in that UI. - Restart MCP gateway after merge so
bt_invoices_*picks up the branch.
Brad merges when ready. Stay off live BT session (Construction Ops owns it).
CHANGELOG and api-map prose still described the 3 Sep Auth0 miss as current. Capture landed 4 Sep via PUT save-invoice merge-patch; addLines is the same Save write. EntityAttachmentsToInvoice is a JS picker hint. Co-authored-by: Brad Caldon <BuildCal@users.noreply.github.com>
BuildCal
BuildCal
commented
Sep 6, 2026
@BuildCal
BuildCal
left a comment
Owner
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CTO review — COMMENT (approve-ready after undraft)
HEAD 3c48dc3 · CI Gateway / Web / BT Service all green · mergeable · still DRAFT
Verdict
Prior docs block cleared. Approve-ready for Brad to merge after undraft. CTO does not merge.
What changed since 9ecbbce
- Docs commit
3c48dc3aligns CHANGELOG +buildertrend-api-map.md+ slice-c with the 4 Sep Cabbaroo Save capture (no more stalenot_captured/ Cubbaroo contradiction). - Implementation unchanged and still sound:
PUT /apix/v3/Invoices/save-invoicemerge-patch;invoices.saveDraft/invoices.addLinescaptured; forcednotifyOwnerfalse,createInvoiceChkboxfalse,status1;guardConflicton both writes;invoices.sendremains send-locked.
Nits (non-blocking)
invoiceSaveDraftPayloadstays sparse merge-patch (does not seed full current invoice). Callers must pass neededheader/bodyfields; empty header only forces id/job/draft locks — fine for first sandbox Save, just know it.- Capture append section in api-map has a duplicate Cabbaroo heading (Grid-only then Grid+Save). Harmless clutter.
- Restart MCP gateway after merge so
bt_invoices_*picks up the branch.
Ship notes
- Keep
BT_GATEWAY_ENABLE_SEND=false. Never Send / pay / notify. - Prefer a sandbox draft for any live Save; avoid hammering Cabbaroo
18059815/ job41648716while Ops is in that UI. - Stay off live BT session (Construction Ops owns it).
Brad merges when ready. CTO never merges.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Summary
18059815/ job41648716using dedicated profile/home/box/bt-gateway-profile.PUT /apix/v3/Invoices/save-invoicewithapplication/merge-patch+json.invoices.saveDraftandinvoices.addLinesimplemented from that capture (addLines = same Save withlineItems/ownerInvoiceLineItems). Related picker GET:/api/LineItems/EntityLineItemsToInvoice.status1,notifyOwnerfalse,createInvoiceChkboxfalse. Draft remains Not sent.9ecbbce.Test plan
Do not merge until Brad reviews. Remains DRAFT.