Ticket #948 (assigned enhancement)

Opened 3 years ago

Last modified 2 years ago

Highlight (to a sysadmin) which packages are deleted

Reported by: dread Owned by:
Priority: minor Milestone: ckan-future
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description

When a customer logs in as a sysadmin then he/she see all packages, including deleted and pending ones. These are hidden to the average user, but the sysadmin has no idea of this until he clicks on the package and sees at the bottom 'state: deleted'.

It should be more obvious than that on the search view - an icon, message or crossed-out name to packages are deleted.

Change History

comment:1 Changed 3 years ago by sebbacon

I would propose a "trash can" model: a "deleted items" area where only deleted items can be viewed / searched. Deleted items should not appear anywhere else, but we could include a "also search deleted items" option in the search for admins. (In which case, deleted items should have a "div class='deleted'" or similar so they can be highlighted with CSS).

comment:2 Changed 3 years ago by dread

This sounds like a good solution to me. This should include not just packages, but groups and all other stateful objects.

comment:3 Changed 3 years ago by dread

There's also the API to consider.

One edge case to consider too - currently we don't allow reuse of the name of a deleted package, which is confusing. The deleted package should be moved aside (renamed), unless the deleted package is entirely the same as the new or renamed package.

comment:4 Changed 3 years ago by sebbacon

  • Owner set to sebbacon
  • Repository set to ckan
  • Theme set to none

comment:5 Changed 3 years ago by sebbacon

Emptying the trashcan (which would amount to purging deleted objects) would probably be a function of the administrative dashboard #833

comment:6 Changed 3 years ago by dread

We have a use case now for DGU where if a user requests a deleted package, he is 302 redirected to another package (specified in the deleted package's extras). This is for the API, but could also be done in the Web UI if deleted packages are hidden away in a trashcan. But this suggests we need a trashcan in the API too.

i.e we should keep the data model really synchronised between the Web UI and API, (even if they are becoming divorced from the ORM Model - or maybe we should have a trashcan in the ORM model too?)

Ideas:

  • GET api/rest/package - lists active packages
  • GET api/rest/package/traffic_data - active package
  • GET api/rest/trash/package - lists deleted packages
  • GET api/rest/trash/traffic_data_old - deleted package

comment:7 Changed 3 years ago by dread

Note: Packages will now be excluded from the search view (see #1283). Also there is now no redirect requirement from DGU any more.

comment:8 Changed 2 years ago by thejimmyg

  • Owner changed from sebbacon to thejimmyg
  • Status changed from new to assigned

Re-assigning to me temporarily to investigate now that Seb has left.

comment:9 Changed 2 years ago by ross

  • Owner thejimmyg deleted
  • Milestone set to ckan-future
Note: See TracTickets for help on using tickets.