locdb / loc-db

This is the central component of the LOC-DB project.
9 stars 2 forks source link

Update entry pointer #12

Closed lgalke closed 6 years ago

lgalke commented 6 years ago

steps

  1. Select Entry
  2. Link to New Resource (press commit)
  3. Realize that you have made a mistake,
  4. Try to link to External Crossref Suggestion instead

expected

the link gets updated

error

400 - Bad Request "The entry is already linked."

Would it be a problem to allow updates for entry.references via addTarget?

anlausch commented 6 years ago

For such cases I've added a service for reverting the linking.

GET /removeTargetBibliographicResource

Given the _id of a bibliographic entry this service clears all properties related to a potential target resource in a consistent way. More precisely, the following three things happen: The ‘references’ property of the bibliographic entry will be cleared The _id of the old target resource will be removed from teh ‘cites’ property of the parent resource of the entry The ‘status’ of the bibliographic entry will be changed to OCR_PROCESSED --> Is this always ok? Note that the old target bibliographic resource will not be deleted.

Now that we have electronic Resources, the status update has to be adapted.

lgalke commented 6 years ago

IC ok then I will call this before, when the references field is already filled.

anlausch commented 6 years ago

I will then close the issue. Feel free to open it again when you encounter problems related to this.