Filter By Week Returns No Results

Ask your questions here.
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post by empmdk »

I've finished updating to 2.8 & tested. Still getting no week filter results.
User avatar
support
Site Admin
Posts: 6204
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Filter By Week Returns No Results

Post 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?
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post 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.
User avatar
support
Site Admin
Posts: 6204
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Filter By Week Returns No Results

Post 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.
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post 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.
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post 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.
User avatar
support
Site Admin
Posts: 6204
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Filter By Week Returns No Results

Post by support »

3.5.3 released today, please update. Let me know if it works ok now.
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post by empmdk »

Fantastic! It is working now without error. Thank you, Sergey.
Post Reply