Version 7 (modified by Dominic König, 14 years ago) ( diff )


BluePrints | Record Merger

BluePrint: Record Merger


There are several occasions where records need to be merged manually, e.g.:

  • De-duplication
  • Synchronization conflict resolution


The idea is to implement a generic merge method for the RESTful API, which responds to URLs like:

  • merge record 27 (=merge source) into record 25 (=original record)

Additionally, the low-level API could also accept a Storage of fields from the caller instead of another record.


  • GET merge returns a form like above:
    • the merge form behaves basically like a normal update form:
      • the user can edit the original record
      • the user can click on <<copy to copy values from the merge source
  • POST merge does:
    • update the original record with the data of the form
    • update all links to the merge source into links to the original record
    • mark the merge source deleted (or delete it, if no deletion status)
    • audit update
  • PUT merge does:
    • respond with "invalid method" (HTTP/405)
  • DELETE merge does:
    • respond with "invalid method" (HTTP/405)
  • Errors:
    • original record does not exist => HTTP/404 Not Found
    • merge source does not exist => HTTP/404 Not Found (or redirect to update?)


  • Primary actor:
    • admin user / editor user
  • Merging of duplicate records in the de-duplicator
    • De-duplicator UI presents a list of possible pairs of duplicates: (original, duplicate)
    • List entries are linked to the merge method (action button)
  • Merging of conflicting remote records in the synchronization conflict resolution UI
    • Conflict UI presents a list of conflicting updates: (original, conflicting update)
    • List entries are linked to the merge method (action button), or delete


  • Implement merge as a method in S3Resource, which:
    • generates the merge form from either another record in the same resource or a Storage of fields
    • processes the form upon POST
  • Implement merge as a method in S3CRUDHandler, which:
    • parses the URL query variable with
    • calls the S3Resource.merge method appropriately
  • Implement a generic view merge.html (_merge.html) which:
    • renders the form


  • not yet implemented, scheduled for S3XRC 2.3


Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.