Skip to main content

Feature request: support {time} in mass action filters on DATETIME columns (e.g.

2 hours 40 minutes ago #100000718 by Lumiga
-- Browser(s) name and version -- : Chrome 156.0

Hi, 

I'm setting up a mass action on the User table to remove inactive customer accounts for GDPR data-retention purposes: users who haven't logged in for more than 7 years. 

The filter "User columns > lastvisitDate < {time}-220903200" fails with: 

Incorrect DATETIME value: '1573952771' 

{time} is replaced by a Unix timestamp, which works fine for HikaShop's own timestamp columns (user_created, order_created, ...), but lastvisitDate comes from the Joomla #__users table and is a DATETIME column, so MySQL rejects the integer. 

Workarounds I tried: 
- A fixed value like 20191116000000 works, but has to be updated manually. 
- A date string like "2019-11-16 00:00:00" is rejected with "Wrong value" because only numeric values are accepted for <, >, <=, >=. 
- REGEXP works but is also static. 

Feature request: 
When a filter value contains {time} and the target column is a DATETIME/DATE column (such as the Joomla user columns lastvisitDate and registerDate), please convert the calculated timestamp to 'Y-m-d H:i:s' before building the query. Alternatively, a dedicated filter such as "Last visit older than X days" would also solve it. 

This would allow fully automated, cron-triggered retention clean-ups without manual maintenance, which is useful for many shops given GDPR requirements. 

Thanks in advance!

Kind regards,
Lumiga

Please Log in or Create an account to join the conversation.

Time to create page: 0.039 seconds
Powered by Kunena Forum