SanomaCZ / ella-hope

Brand new admin for Ella 3+
Other
3 stars 0 forks source link

there are drafts orphans left #13

Open yedpodtrzitko opened 11 years ago

yedpodtrzitko commented 11 years ago

Drafts are deleted only on save and leave action (I guess). Drafts table can be easily polluted then.

Suggestion: hook onclose event and ask user if he wants to keep draft. Delete it otherwise.

There are also created multiple instances of the same draft (see below). Could we reuse existing instance again for the same combination of content_type_id and user_id or something?

 20 |              37 |       1 |      | 2012-11-27 11:56:12+01 | {"category": "/admin-api/category/1/", "publish_to_date": "", "description": "", "title": "", "photo": "", "state": "added", "id": "", "content": "", "source": "", "publish_to_time": "", "publish_from_time": "", "enable_comments": "", "related-name": "", "slug": "", "publish_from_date": ""}
 21 |              37 |       1 |      | 2012-11-27 11:58:01+01 | {"category": "/admin-api/category/1/", "publish_to_date": "", "description": "", "title": "", "photo": "", "state": "added", "id": "", "content": "", "source": "", "publish_to_time": "", "publish_from_time": "", "enable_comments": "", "related-name": "", "slug": "", "publish_from_date": ""}
 23 |              37 |       1 |      | 2012-11-27 12:07:12+01 | {"category": "/admin-api/category/1/", "publish_to_date": "", "description": "", "title": "", "photo": "", "state": "added", "id": "", "content": "", "source": "", "publish_to_time": "", "publish_from_time": "", "enable_comments": "", "related-name": "", "slug": "", "publish_from_date": ""}
 28 |              37 |       1 |      | 2012-11-27 14:52:49+01 | {"category": "/admin-api/category/1/", "publish_to_date": "", "description": "", "title": "", "photo": "", "state": "added", "id": "", "content": "", "source": "", "publish_to_time": "", "publish_from_time": "", "enable_comments": "", "related-name": "", "slug": "", "publish_from_date": ""}
 29 |              37 |       1 |      | 2012-11-27 14:53:28+01 | {"category": "/admin-api/category/1/", "publish_to_date": "", "description": "", "title": "", "photo": "", "state": "added", "id": "", "content": "", "source": "", "publish_to_time": "", "publish_from_time": "", "enable_comments": "", "related-name": "", "slug": "", "publish_from_date": ""}