Restore UnusedDays widget binding in query
Re-add NULLIF/COALESCE pattern for UnusedDays.text input filter now that the base query is confirmed working. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,5 +30,6 @@ 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) >= 365
|
||||
WHERE (CURRENT_DATE - COALESCE(last_txn.last_transaction_date, i.item_created, cc.comment_date)::date)
|
||||
>= COALESCE(NULLIF('{{UnusedDays.text}}','')::int, 365)
|
||||
ORDER BY "Days Unused" DESC
|
||||
|
||||
Reference in New Issue
Block a user