Closed (fixed)
Project:
Station
Version:
6.x-2.x-dev
Component:
Schedule
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2010 at 22:24 UTC
Updated:
23 Jul 2010 at 05:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
drewish commentedHum... I need to look at the schedule item edit forms and make sure they don't use the loaded array to check for collisions. Perhaps we should just look at the program nodes in hook_nodeapi and remove them from the schedule when they're unpublished so you can schedule something else?
Comment #2
tim.plunkettIt took me until now to sit down and figure out what you meant.
If unpublishing a program also unscheduled it, that would be brilliant, and I'm considering investing some time into figuring that out.
Your worry about collisions refers to PROGRAMS being unpublished.
But my issue is separate from that. I'm talking about on a program node, where it says when a program is scheduled.
If the SCHEDULE is unpublished, it will still list when the program is on that schedule. This fixes that.
I've been using my patch above, and have since added, removed, unpublished, and republished schedules with no error.
Comment #3
tim.plunkettAdding an update case to
station_schedule_nodeapiseemed like the best way to unschedule programs when they're unpublished.However, I wasn't sure the best way to go about doing that...
So I made two patches!
Let me know if either of them are the correct way of doing things.
Comment #4
tim.plunkettI'd mark this RTBC but it needs a second opinion.
Comment #5
tim.plunkettWhile working on #757408: Add views filter for "Is default schedule", I noticed that the setting for default schedule allowed unpublished schedules. This patch does the same thing as #3, but
station_schedule_get_list()now won't return unpublished schedules.It works beautifully.
Comment #6
tim.plunkettd'oh
Comment #7
drewish commentedI feel like if we're going to remove it from the schedule we should form alter the Published checkbox to put a warning that unpublishing it will remove it from the schedule. Otherwise you'd be in for a surprise and be annoyed that you loose some data. Perhaps it would be better to just not display unpublished programs? At least to people with out administer schedule or nodes permissions?
Comment #8
tim.plunkettYou're correct, removing an unpublished program without warning is bad UX.
I think it might be worth working in an option to do that, or a warning, but the main purpose of this issue was to suppress the loading of unpublished programs.
So I think we should commit the patch that does that, and I'll open a separate issue for the new feature.
Comment #9
drewish commentedLooks good to me.
Comment #10
tim.plunkettThanks, committed to HEAD.