Hardcode 365 days to isolate query issue from widget binding

Remove UnusedDays.text widget reference and dynamicBindingPathList
to test whether the base query works against the datasource.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 16:03:26 -05:00
parent c29125c3e0
commit 659b29e2f5
3 changed files with 5 additions and 12 deletions

View File

@@ -30,9 +30,5 @@ LEFT JOIN (
JOIN invhist ih ON ih.invhist_itemsite_id = isite.itemsite_id
GROUP BY isite.itemsite_item_id
) last_txn ON last_txn.itemsite_item_id = i.item_id
WHERE (CURRENT_DATE - COALESCE(last_txn.last_transaction_date, i.item_created, cc.comment_date)::date)
>= CASE
WHEN '{{UnusedDays.text}}' ~ '^\d+$' THEN '{{UnusedDays.text}}'::int
ELSE 365
END
WHERE (CURRENT_DATE - COALESCE(last_txn.last_transaction_date, i.item_created, cc.comment_date)::date) >= 365
ORDER BY "Days Unused" DESC