-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templates carry over putcodes #49
Comments
Unfortunately I don't think there is a way of knowing one item is a template copy of another. The "New version" button creates a copy where the "succeeds" field links the new item to the old one, but the "Use as template" button just creates a copy. Ultimately we need to rethink the way metadata about ORCIDs is stored and created so we also know where ORCIDs have come from. Therefore this may be something to think about with respect to eprints/orcid_support#25. |
However, I've just remembered, I think we can stop some fields from being copied when making a template, using the "can_clone" parameter in a field definition, e.g.
|
Thanks for the quick reply, I'll give that a try. Alternatively we could change the template function like this, in order to remove putcodes and setting orcid_update to 1, so that the pre-commit trigger doesn't touch the putcodes at all.
|
My concern with the above is that action_use_as_template defined in a screen in the EPrints core and therefore isn't an ideal thing for a Bazaar plugin to be overriding as we don't know how this screen is used across other repositories that may be using the plugin (ideally Bazaar plugins should really just add new functionality rather than change existing functionality). |
I absolutely agree. I just happened to find this solution (or rather workaround) at about the same minute you posted yours and wanted to document it in case the "can_clone" didn't work. But it does and clearly is the preferable one! Thanks for your help! |
Ha ha, no worries - glad we found a good solution! |
fixes eprints#49 , thanks @wfyson !
When using an exported item as a template for another item, the putcodes in the creators table are carried over. They must be deleted in order to prevent conflicts in import & export.
The problem is, that the he pre-commit trigger re-adds the putcode even after it has been deleted. Can the trigger somehow detect, whether it's handling a template and then not carry over the putcode? (@wfyson)
The text was updated successfully, but these errors were encountered: