◄ ► | Edit | Home | Admin | en de fr et | Sign in

#6832 (Bug in calview.WeeklyView)

by Luc Saffre · in Developers · assigned to Sharif Mehedi

Summary

Sign in as robin in patrols1, click on Calendar quick link. Calendar is in weekly view and shows a series of events on Fri, Sat and Sun. Navigator shows that week 21 is active. Now click on week 20 in the navigator, then back on 21. The events are gone.

A debug print 20260528 during get_request_queryset() shows that parameter end_date is set to 20260101. That's obviously the cause of the issue, but why is end_date set? I see that SiteConfig.hide_events_before is set to 20260101 in patrols1, and indeed when I manually set this field to blank, the issue disappears. But I couldn't yet find any code that would set end_date to this date.

The AJAX request has start_date set to 20260101 (which is correct), but the debug print has start_date None and end_date 20260101. Smells like a typo bug somewhere...

javascript:window.App.runAction({ "action_full_name": "calview.WeeklyView.detail", "actorId": "calview.WeeklyView", "onMain": true, "rp": null, "sr": -4, "status": { "base_params": { }, "param_values": { "assigned_to": null, "assigned_toHidden": null, "cal_entryrepeater": null, "cal_entryrepeaterHidden": null, "cal_recurrentevent": null, "cal_recurrenteventHidden": null, "courses_course": null, "courses_courseHidden": null, "courses_line": null, "courses_lineHidden": null, "end_date": null, "event_type": null, "event_typeHidden": null, "navigation_panel": null, "observed_event": null, "observed_eventHidden": null, "owner_id": null, "owner_idHidden": null, "owner_type": null, "owner_typeHidden": null, "presence_guest": null, "presence_guestHidden": null, "room": null, "roomHidden": null, "show_appointments": null, "show_appointmentsHidden": null, "start_date": "01.01.2026", "state": null, "stateHidden": null, "user": null, "userHidden": null }, "record_id": -4 } })

Children

Comments

  • 4 months, 3 weeks ago by Luc Saffre about #6832 (Bug in calview.WeeklyView) : The solution 1 seems to work perfectly. I pushed this change, plus another minor bug (display "Foo" instead of the planner.text
  • 4 months, 3 weeks ago by Luc Saffre in reply to Sharif Mehedi about #6832 (Bug in calview.WeeklyView) : Good work! I seem to prefer 1), but the Workers planner in presto1 is still failing as soon as I set a parameter or use the navigation_panel (so this is another problem) and I don't yet understand why the react frontend gets special handling of pfs in lines 67-70 in store.py
  • 4 months, 3 weeks ago by Sharif Mehedi about #6832 (Bug in calview.WeeklyView) (1 reply) : I've found the root cause for this. In calview.ui the DayNavigator sets one parameter for the user foreignkey wrapped in ObservedDateRange. The DayNavigator is inherited by WeeklyView, and not by WeeklySlave. And this is why the "user" pv comes at the beginning for WeeklyView and not for WeeklySlave...
  • 4 months, 3 weeks ago by Luc Saffre about #6832 (Bug in calview.WeeklyView) : I added a Calendar section to our manual testing suite.
  • 4 months, 3 weeks ago by Luc Saffre about #6832 (Bug in calview.WeeklyView) : The calview plugin settings clone_parameters_from and params_layout are relatively new. And the ParameterClone.clone_from attribute was named before this time. Note that ParameterClone is not only used by the 3 calendar master views and the 3 calendar slave views, but also by the independent table D...
  • 4 months, 3 weeks ago by Luc Saffre about #6832 (Bug in calview.WeeklyView) : Maybe the names use_detail_param_panel and use_detail_params_value aren't good names. Here we see the WeeklyView table in display mode "detail" (that's it's default display mode, we never use it in any other display mode). The parameter panel is on the left because params_panel_pos = 'left'. It exist...
  • 4 months, 3 weeks ago by Sharif Mehedi about #6832 (Bug in calview.WeeklyView) : The front end is right to send the pv from WeaklyView for WeaklySlave because WeaklySlave has "use_detail_params_value = True" through DaySlave table mixin.
    So, we should ask, "Why does the order of the param_fields varies between WeaklyView and WeaklySlave?"
  • 4 months, 3 weeks ago by Sharif Mehedi about #6832 (Bug in calview.WeeklyView) : For some reason, the order of the param_fields differs between WeaklyView and WeaklySlave. The start_date in WeaklyView is at the second place whereas it is at the first place for the WeaklySlave. Front-end sends the param values as it finds in WeaklyView. Not sure how to handle the problem though.
  • 4 months, 3 weeks ago by Luc Saffre about #6832 (Bug in calview.WeeklyView) : I showed the bug to @8lurry and he will dig into it. Our guess is that the position of the individual parameter fields in the pv array get messed up somewhere. Maybe because calview inherits the parameters from cal.Events, which is a quite hackerish magic.
  • 4 months, 3 weeks ago by Luc Saffre about #6832 (Bug in calview.WeeklyView) : I will soon push my changes for #6834 (Event filter parameters defined by EventGenerator) and then I'd like to look at this together with @8lurry. I've added some debug print statements with "20260528" to remind myself the relevant places in the code. The new feature adds a parameter course_line to the Events table when courses is installed. This is currently us...
  • 4 months, 4 weeks ago by Luc Saffre about #6832 (Bug in calview.WeeklyView) : Created new Ticket #6832 (Bug in calview.WeeklyView).