Opened 19 years ago
Closed 19 years ago
#2258 closed patch (fixed)
Deleting orphaned channels (unassigned) in channel editor removes \all\ channels
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.20 |
Component: | mythtv | Version: | 0.20 |
Severity: | medium | Keywords: | channel editor delete unassigned |
Cc: | Ticket locked: | no |
Description
(Kindly note that I consider this a defect in what one would expect both of the general functionality and as implied by the user interface, and thus not a feature request).
The current implementation of the channel editor allows one to filter video sources to list just those channels available on each source. If a source has been deleted in mythtv-setup "Video Sources" screen, any channels attached to that source become orphaned.
In the mythtv-setup Channel Editor, filtering on orhpaned channels (video source becomes "Unassigned") and attempting to delete them 'en masse' results in \all\ channels defined in the database being removed, due to a "TRUNCATE TABLE channel" query.
The misleading message displayed after selecting Delete ("Are you sure you would like to delete these channels?") - when the channel list contains a filtered list of the unassigned channels (surely the 'these channels' that the message refers to) does not help the user either.
Would it not make sense for ChannelEditor::deleteChannels(void) to check whether there are any other defined video sources with attached channels before truncating the table completely and destroying everything? If there are, just delete those channels unassigned to a source; if there are not, truncate the channel table.
Even from a fairly experienced MythTV user's perspective this behaviour is neither obvious nor clearly explained and had me quickly reaching for my mythconverg backup once I saw \all\ 120+ channels missing.
Thanks, Nick
Change History (5)
comment:1 Changed 19 years ago by
Milestone: | → 0.21 |
---|
comment:2 Changed 19 years ago by
comment:3 Changed 19 years ago by
(In [11415]) Refs #2258. Fixes the orphaned channel deletion in SVN head.
When you have the "Unassigned" channels visible in the mythtv-setup channel editor selecting delete deleted all channels, this implements the more intuitive behaviour of only deleting the "Unassigned" channels.
This could have been done in a single SQL query in mysql 4.0 or later, but I used two queries and a little code to maintain mysql 3.x compatibility.
comment:4 Changed 19 years ago by
Milestone: | 0.21 → 0.20 |
---|---|
Type: | defect → patch |
Version: | head → 0.20 |
comment:5 Changed 19 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [11496]) Fixes #2258 in 0.20-fixes. Backport of [11415].
Original commit message: Fixes the orphaned channel deletion in SVN head.
When you have the "Unassigned" channels visible in the mythtv-setup channel editor selecting delete deleted all channels, this implements the more intuitive behaviour of only deleting the "Unassigned" channels.
This could have been done in a single SQL query in mysql 4.0 or later, but I used two queries and a little code to maintain mysql 3.x compatibility.
Confirmed delete problem, I'll fix this when I get back from vacation. See also #2240.
If deleting a video source does not delete the associated channels, this is a bug as well.