dharmafly / tasket

A micro-volunteering app, for crowd-managed tasks.
http://dharmafly.com/tasket
26 stars 3 forks source link

Notepad: Unable to delete hubs that have completed items #421

Closed jameswragg closed 13 years ago

jameswragg commented 13 years ago

It seems that hubs that have completed tasks cannot be deleted.

Steps to recreate:

  1. Create a new hub
  2. add a task
  3. complete that task
  4. try to delete the list

Notice that the API responds with "400: {"error": "Cannot delete hub"}"

  1. mark the task as incomplete
  2. try to delete the hub & notice success
premasagar commented 13 years ago

Hubs with tasks that have seen action (i.e. they are in a state of "claimed", "done" or "verified") cannot be deleted. Perhaps we should have in local_settings.py a setting for the server, which would allow or disallow this behaviour.

The way to overcome it is to "archive" the hub instead of deleting it: https://github.com/dharmafly/tasket/blob/master/client/media/tank/js/models/hub.js#L173

I think it's fine to archive the hub, but it would be good if we did have a way to force the deletion of a hub with actioned tasks.

In the Tank app, only when a hub has no actioned tasks is a user allowed to delete it; otherwise, they can only archive the hub.

premasagar commented 13 years ago

Fixed in 3938c5af1e3bdfebfc31a518939e3b3ff315b812