From f58b19d94071daf912ab83479fb411aca8224833 Mon Sep 17 00:00:00 2001 From: Tavis Ormandy Date: Tue, 18 Apr 2023 20:23:40 -0700 Subject: fix #2220, bucket transactions ignored with reg --related This adds a new item flag, `ITEM_INFERRED`, that differentiates generated items from bucket items. This makes them show up as related items in reports. --- src/item.h | 1 + src/xact.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/item.h b/src/item.h index c21450e8..84f062ab 100644 --- a/src/item.h +++ b/src/item.h @@ -86,6 +86,7 @@ public: #define ITEM_GENERATED 0x01 // posting was not found in a journal #define ITEM_TEMP 0x02 // posting is a managed temporary #define ITEM_NOTE_ON_NEXT_LINE 0x04 // did we see a note on the next line? +#define ITEM_INFERRED 0x08 // bucketed item enum state_t { UNCLEARED = 0, CLEARED, PENDING }; diff --git a/src/xact.cc b/src/xact.cc index 961ff010..55e816cb 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -210,7 +210,7 @@ bool xact_base_t::finalize() // been set. if (journal && journal->bucket && posts.size() == 1 && ! balance.is_null()) { - null_post = new post_t(journal->bucket, ITEM_GENERATED); + null_post = new post_t(journal->bucket, ITEM_INFERRED); null_post->_state = (*posts.begin())->_state; add_post(null_post); } -- cgit v1.2.3