Skip to contents

Returns Trash rows for originals whose corresponding create-ledger entry is marked "done" and records a new item key.

Usage

ztBlockMoveTrash(records, createLedger, fromLibrary)

Arguments

records

The records given to ztBlockMoveCreate().

createLedger

The zotExecute() ledger of the create plan.

fromLibrary

Library holding the originals.

Value

A guarded-flow plan of trash rows.

Examples

Records <- data.table::data.table(
  itemKey = "OLD1", payload = list(list(title = "Reviewed book")),
  hasFile = FALSE
)
Ledger <- list(items = list(`create-1` = list(status = "done", new = "NEW1")))
ztBlockMoveTrash(Records, createLedger = Ledger, fromLibrary = "user")
#>    action library itemKey   payload
#>    <char>  <char>  <char>    <list>
#> 1:  trash    user    OLD1 <list[0]>