Skip to content

Keep a macro filter from being replaced by an earlier list reload - #1326

Merged
AgreeDK merged 1 commit into
OpenSAK-Org:betafrom
nagisml:fix/macro-filter-stale-refresh-1325
Nov 17, 2026
Merged

AgreeDK merged 1 commit into
OpenSAK-Org:betafrom
nagisml:fix/macro-filter-stale-refresh-1325

Conversation

@nagisml

@nagisml nagisml commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Keep a macro filter from being replaced by an earlier list reload

A macro calling opensak.clear_filter() and then opensak.filter{} showed
the filtered list at once. The full list that clear_filter() had started
loading in the background then arrived and replaced it. The grid showed
every cache while the filter, and the red clear button, stayed active.
It happened only sometimes: opensak.progress lets queued events run, so
a load that finished during the macro's loop arrived early and did no
harm. On large databases the load often finished later.

The background reload result is discarded only when a newer reload has
been requested. Showing a filter result, or reloading the table after an
import, filled the grid directly without making the running reload
stale. Both now do, through the new _discard_pending_refreshes().

fixes #1325

A macro calling opensak.clear_filter() and then opensak.filter{} showed
the filtered list at once. The full list that clear_filter() had started
loading in the background then arrived and replaced it. The grid showed
every cache while the filter, and the red clear button, stayed active.
It happened only sometimes: opensak.progress lets queued events run, so
a load that finished during the macro's loop arrived early and did no
harm. On large databases the load often finished later.

The background reload result is discarded only when a newer reload has
been requested. Showing a filter result, or reloading the table after an
import, filled the grid directly without making the running reload
stale. Both now do, through the new _discard_pending_refreshes().

fixes OpenSAK-Org#1325
@AgreeDK
AgreeDK merged commit d1d68c5 into OpenSAK-Org:beta Nov 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants