Filter By Week Returns No Results

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

Filter By Week Returns No Results

Post by empmdk »

I've had an issue specifically with the "Filter By Week" option even since I started using Rukovoditel. I have never been able to get it to show any results when filtering by week for the "Date Added" field. All other filters are working fine.
I didn't have a need to use the week option before but now it is required for some of our reports.

Any steps I can take to get this working? For example, I'm filtering Created By > Current User & Date Added > Filter By Week 0
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 »

I just tested and it works ok for me.
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post by empmdk »

Is there any information I could provide to help solve this? Trying with "Date Updated" field also returns no results, even as an admin.
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 »

I just added filter and it works for me. Have no idea why it's not working for you.
Attachments
screenshot-pm.rukovoditel.net-2021.01.15-08_31_03.png
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post by empmdk »

I created a new entity with a single text input field, added a record and tried filtering by week and no result.
I installed another copy of Rukovoditel with new database and it is working there. To make sure it wasn't a corrupt file, I tried restoring a database backup from the other one to this new install and it stopped working again.

After reverting the new one back I started looking into the database itself to compare and I've noticed the new install has several functions. The original database only has "rukovoditel_regex_replace" and the following entries are missing:
  • rukovoditel_days_diff
  • rukovoditel_hours_diff
  • rukovoditel_months_diff
  • rukovoditel_years_diff
Should I manually create these functions in the original and copy the configuration?
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 »

I think you have to check filed type in database. So open phpmyadmin. Select entity table (entity_id) and check type for date field (field_id).
It should be "bigint" width default "0" not null

Functions like rukovoditel_days_diff will be created automatically once you create the days_diff field type etc.
Attachments
screenshot-localhost-2021.01.16-07_25_16.png
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post by empmdk »

Found the date_added field in one of the entities and it is set to bigint (11), default 0 and it was set to YES for null so I changed that to NO. Added a new record and applied the filter, no results. The new install has the date_added field set with YES for null by default.

Date & timestamps are being created and visible in that field on record add.
ee4631cf8f92.png
3dbbe92e3023.png
4d86d6a995c6.png
4d86d6a995c6.png (9.44 KiB) Viewed 610 times
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 »

Can you do more tests. So if you set Filter By Week 0 then no result or result is incorrect?
Which version of app do you use?
empmdk
Posts: 166
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Filter By Week Returns No Results

Post by empmdk »

Yes, the only filter I have set is Date Added > Filter by Week 0, it returns no results. There are 84 records for the current week in that entity.
I'm using version 2.7.1. I can try updating to 2.7.2 to see if that fixes but I've had this filter issue for several past versions as well.
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 »

Version 2.8 will be release soon. So update to 2.8 and if problem will be exist we will try to sort out.
Post Reply