Ticket #1012 (closed defect: fixed)
Add package revision history to api
Reported by: | kindly | Owned by: | kindly |
---|---|---|---|
Priority: | minor | Milestone: | ckan-v1.4 |
Component: | ckan | Keywords: | |
Cc: | Repository: | ckan | |
Theme: | none |
Description
Revision history information is not accessible, dgu want this.
Change History
comment:1 Changed 3 years ago by thejimmyg
- Priority changed from awaiting triage to minor
- Milestone changed from ckan-v1.4-sprint-3 to ckan-v1.4-sprint-4
comment:2 Changed 3 years ago by kindly
- Repository set to ckan
- Theme set to none
This is entirely not trivial at the moment. Hopefully after the dictization it will become more so. Simply putting in the package revision object in place of the package does not work. It will obviously work for changes to the package object itself. However, there are no mappers on that object for getting out the related package_tags, resources and extras at that revision. You will have to construct a fake pkg object with some messy and painful queries using dates.
comment:3 Changed 3 years ago by kindly
cset:5649d6e761fc
The basic revision history is merged. I will keep this ticket open if it is not sufficient.
All it does is give a list with the most recent first of revision_ids, authors and timestamps.
i.e
[{"timestamp": "2011-03-16T15:55:19.941961", "author": "southampton-ac-uk", "revision": "202e9eb8-afaa-4bc9-b8a1-a317561547ea"}, {"timestamp": "2011-03-15T17:59:16.430804", "author": "southampton-ac-uk", "revision": "8235bd0a-d39a-49e0-887a-b0f231be8a92"}]
comment:4 Changed 3 years ago by thejimmyg
- Milestone changed from ckan-v1.4-sprint-4 to ckan-v1.5
The API part is now done. Bumping the view history part to 1.5
comment:5 Changed 3 years ago by dread
As I understand it, the whole point to vdm is to make it easy to get old versions of not only the package, but its related objects (like tags, extras). David take a look at this function: Package.get_as_of(revision)
comment:8 Changed 3 years ago by thejimmyg
- Status changed from new to closed
- Resolution set to wontfix
No-one really seems to have requested this part.
comment:9 Changed 3 years ago by dread
- Status changed from closed to reopened
- Resolution wontfix deleted
Changing this to 'Fixed' and #103 to 'Wont fix' to ensure this feature is noted.
comment:10 Changed 3 years ago by dread
- Status changed from reopened to closed
- Resolution set to fixed
- Milestone changed from ckan-v1.5 to ckan-v1.4
See also #103 which says:
As a user I want to view a package at a given revision:
Could you please investigate how doable this would be given the current package read.html page. I expect it could be very easy once the revision API is in place because we could build a c.pkg object from the revision data instead of the model data.
Perhaps another case where we could try introducing the dictization?