pressbooks / ideas

Ideas for Pressbooks.
GNU General Public License v3.0
12 stars 4 forks source link

Allow people to edit/delete tags used in their catalogue #387

Open josieg opened 3 years ago

josieg commented 3 years ago

Feature Description

This request is related to the personal catalogue that every Pressbooks user can create. As it is right now, once you create a tag to help sort the books in the catalogue, you cannot delete or edit the tag. It would be helpful to be able to delete or edit tags that are no longer applicable or have errors.

Feature Use Case

A very specific case, but the owner of this catalogue (https://pressbooks.bccampus.ca/catalog/openubc) wants to correct the capitalization of the "engineering" category. However, they are unable to do so because when they try to create a new category that is properly capitalized, the existing tag (which is in sentence case) is selected instead. And they are unable to delete that tag to create a new one.

SteelWagstaff commented 3 years ago

Looking into this one. Will need to examine https://github.com/pressbooks/pressbooks/blob/dev/templates/admin/catalog.php and https://github.com/pressbooks/pressbooks/blob/861dbce499e293d3a7f05990bed3e5d0e911b6da/inc/class-catalog.php#L530-L614

SteelWagstaff commented 3 years ago

@josieg Update -- this feature was built in 2013 and hasn't been much updated since then. There's no user interface for editing tags at the minute and no good work around. Only way to fix is to edit directly in your database (look for a table called wp_pressbooks_tags or similar): https://github.com/pressbooks/pressbooks/blob/861dbce499e293d3a7f05990bed3e5d0e911b6da/inc/class-catalog.php#L87

Your sys admin ought to be able to manually edit the value of entries in this table. If you save the change in this database table and refresh it in the catalog, you should see the fixed/saved values.

We'll add this to our backlog to fix/address in a future release, but don't know when we'll get to it, as this feature is not very widely used and is carrying a fair amount of technical debt. Sorry!

josieg commented 3 years ago

Thanks Steel!