Dates of unpublished events should be excluded from views

Created on 16 July 2024, 7 months ago
Updated 6 August 2024, 7 months ago

Problem/Motivation

Date entities that are themselves published but are related to an unpublished event entity should be excluded from date overviews.
This is especially important for entities imported from third party sources (Reservix etc) that you want to hide on your site; editors will have a hard time unpublishing every single date entity, possibly every day.

It would be much easier to just unpublish the parent event instead.

Proposed resolution

Update the related_date and oc_map_dates views to add a filter on the event's status.

Feature request
Status

Needs review

Version

2.2

Component

Code

Created by

🇩🇪Germany mrshowerman Munich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mrshowerman
  • Issue was unassigned.
  • Status changed to Needs review 7 months ago
  • 🇩🇪Germany mrshowerman Munich

    See attached patch.

  • 🇩🇪Germany hexabinaer Berlin, Germany

    Looking into it, the approach makes sense for the related_date view.

    However, I doubt it will work for oc_map_dates because as far as I remember this filter would not be reflected in the module's code. Have you really successfully tested that filter in an "OC Map"?

  • 🇩🇪Germany hexabinaer Berlin, Germany

    Upon second thought, I might make sense to change the publishing workflow for dates then (default published). As a second step.

  • 🇩🇪Germany mrshowerman Munich

    Have you really successfully tested that filter in an "OC Map"?

    As far as I know, yes. Otherwise the map on https://beta.kultino.de/node/9 would show dozens of "Jever Brauereiführung" dates.

  • 🇩🇪Germany moritz.steinhauer Göttingen

    We should keep one thing in mind: dates and events might belong to different users. If an ensemble unpublishes an event, all dates (that might be published by locations that host an event) will no longer be visible. But this seems like an edge case to me.

    What might be more problematic: often users with the role oc-organiser forget to publish events and only publish their dates. At the moment, this is not a big problem because the text of the event is still rendered in the date, even if the event is unpublished. If we apply mrshowermans patch, we should also change the publishing-workflow for events. Otherwise there will be much more supports-requests caused by "missing dates" in the calendar :-D

  • 🇩🇪Germany hexabinaer Berlin, Germany

    Good point @moritz.steinhauer. This might be very dependent from how calendar content is created and how site owners set the rules.

    It makes sense when events + corresponding dates are imported and published by default. However, we can have different scenarios.

    Maybe a more generic solution would rather be found with an optional ECA function and let site-owners decide to unpublish or even delete dates related to the event in question?

  • 🇩🇪Germany hexabinaer Berlin, Germany

    Oops, so sorry. #3 was related to a different issue :-}

Production build 0.71.5 2024