avram / zandy

Zotero on Android
http://www.gimranov.com/avram/w/zandy-user-guide
GNU Affero General Public License v3.0
148 stars 28 forks source link

Item type switching #15

Open avram opened 13 years ago

avram commented 13 years ago

Switching item types is hard to do-- we'll need to cache the item type mappings from the server, and use them to create conversion routines from one type to another, with confirmation when we're going to lose fields. This needs to happen ASAP, since we currently change the item type without changing the available fields. Maybe the conversion logic can be adapted from the Zotero client code.

fcheslack commented 13 years ago

A method for this is planned for the api as zotero.org also needs this (currently it just does direct field mapping and doesn't even warn on missing data). Not sure when that will be implemented though.

avram commented 13 years ago

This isn't too hard to do locally with cached item templates, but it'd be good to have the server handle, since this is a pretty complex task that requires serious understanding of the type system.

avram commented 13 years ago

The logic is here: https://www.zotero.org/trac/browser/extension/trunk/chrome/content/zotero/xpcom/data/item.js

avram commented 13 years ago

Pushing to 1.2 for now.