Page 2 of 2

Re: Filter By Week Returns No Results

Posted: 19 Jan 2021, 17:59
by empmdk
I've finished updating to 2.8 & tested. Still getting no week filter results.

Re: Filter By Week Returns No Results

Posted: 19 Jan 2021, 20:14
by support
If you create date field and add some data and then create filter, still not working?
What about days filters or other filters by data?

Re: Filter By Week Returns No Results

Posted: 21 Jan 2021, 06:36
by empmdk
I added a Dynamic Date field and added [date_added] in the Formula field then created a new record. Adding the week filter returned a MySQL error on the page.

Code: Select all

Database Error: 1052 - Column 'field_908' in having clause is ambiguous
Query: select e.* , (e.date_added) as field_908 from app_entity_38 e where e.id>0 having ((FROM_UNIXTIME(field_908,'')=date_format(DATE_ADD(now(),INTERVAL 0 WEEK),''))) order by e.date_added desc
Page: /gmratlas28upgrade/index.php?module=items/listing
Changing the field to a Date with calendar picker and saving the record with new data for current day returns no results on the week filter.

Day, Month & Year filters work without issue when using the standard Date Added reserved field.

Re: Filter By Week Returns No Results

Posted: 21 Jan 2021, 09:23
by support
About error "clause is ambiguous" you can't simple assign one field to other in query because there will be issue like this.
In Dynamic field formula you have to use

Code: Select all

[date_added]+0
Then Dynamic field filters will works correctly.

But I still can't reproduce issue with week filters. So nothing to fix for me.

Re: Filter By Week Returns No Results

Posted: 23 Jan 2021, 19:47
by empmdk
I've changed the Dynamic Date field to:

Code: Select all

[date_added]+0
It no longer gives an error & generates the date in the field. Unfortunately, setting the filter for week on that field still has no result.
Would it help for me to post a copy of the database? I can reduce it to a single entity for testing.

Re: Filter By Week Returns No Results

Posted: 14 Apr 2024, 07:57
by empmdk
I just updated to 3.5.2 and still getting this issue only with "Filter by Week". In the error logs, I get this.

Code: Select all

Undefined variable $myslq_date_format
includes/classes/reports/reports.php:941
/index.php?module=items/listing [AJAX]
This effects all 32 entities that I have set up so far.

Re: Filter By Week Returns No Results

Posted: 14 Apr 2024, 09:02
by support
3.5.3 released today, please update. Let me know if it works ok now.

Re: Filter By Week Returns No Results

Posted: 14 Apr 2024, 20:46
by empmdk
Fantastic! It is working now without error. Thank you, Sergey.