pgorod / power-todoist-card

Improved Todoist card for Home Assistant Lovelace UI.
MIT License
20 stars 7 forks source link

[BUG] filter_show_dates_ending #4

Closed colinhatfield closed 8 months ago

colinhatfield commented 8 months ago

Before submitting a bug

Describe the bug Filtering by Dates - filter_show_dates_ending and filter_show_dates_ending do not seem to have any effect

To Reproduce Steps to reproduce the behavior:

  1. Go to any dashboard
  2. Click on add card
  3. Select custom: powertodoist card
  4. Select the correct entity
  5. Click Show Code Editor
  6. Add filter_show_dates_ending: '0'
  7. Add show_dates: true
  8. Click Save

Expected behavior I expected the card to show items due Today, or already overdue

Versions:

colinhatfield commented 8 months ago
Card
pgorod commented 8 months ago

Hi. This seems to work for me so I need to ask for a bit more focused in information.

This is what the screen looks like, after typing the sensor name in the filter box: image

An individual item's information looks like this:

- added_at: '2023-06-18T14:31:46.339183Z'
  added_by_uid: '43790529'
  assigned_by_uid: null
  checked: false
  child_order: 1
  collapsed: false
  completed_at: null
  content: Try a brand new Kanban in HASS! 💪
  description: ''
  due: null
  duration: null
  id: '6975761078'
  is_deleted: false
  labels:
    - Blue
  note_count: 0
  parent_id: null
  priority: 1
  project_id: '2314757944'
  responsible_uid: null
  section_id: '126441679'
  sync_id: null
  updated_at: '1970-01-01T00:00:00Z'
  user_id: '43790529'

Thank you for your help debugging this!

colinhatfield commented 8 months ago

Thank-you for your quick response.

This is the item I'm looking at.

Check

I have just checked now (31/10/23 - 12:04) The due date is 25/11/23 I am not expecting to see it displayed It displays for me

- added_at: '2023-10-30T08:45:24.174761Z'
  added_by_uid: '46871525'
  assigned_by_uid: null
  checked: false
  child_order: 3
  collapsed: false
  completed_at: null
  content: Check Subscribe & Save
  description: ''
  due:
    date: '2023-11-25'
    is_recurring: true
    lang: en
    string: every 25th
    timezone: null
  duration: null
  id: '7362314182'
  is_deleted: false
  labels: []
  note_count: 0
  parent_id: null
  priority: 1
  project_id: '2322783911'
  responsible_uid: null
  section_id: '138223094'
  sync_id: null
  updated_at: '2023-10-30T08:47:01Z'
  user_id: '46871525'

My card in case it is helpful

type: custom:powertodoist-card
entity: sensor.to_do_list_shared
filter_show_dates_ending: '0'
show_dates: true
pgorod commented 8 months ago

Fixed in the latest v0.11-beta !

Thanks for your help, I had actually broken the entire date filtering code in a last-minute refactoring, and I hadn't noticed it yet...