Skip to content
  • joubu's avatar
    Bug 11319: Add the field management for Koha::SimpleMARC · c7d862bb
    joubu authored and Tomas Cohen Arazi's avatar Tomas Cohen Arazi committed
    
    
    Currently the Koha::SimpleMARC module call a "field" a "subfield".
    And the way to manage field is not implemented for all routines.
    
    This patch does not modify the API. The routine's names are kept. It
    just creates 2 privates routines for each action (e.g. delete_field
    will call _delete_field if the action affects field and _delete_subfield
    if the action affects subfields).
    
    Before this patch the move action was authorised by the interface but
    caused an error if executed.
    
    Note: I don't see the meaning for the add/update action if no subfield
    is given. So the call without subfield raises an error.
    
    Test plan:
    - apply all patches
    - create or modify an existent template
    - try at least the correct behavior for the following actions:
      * delete subfield and field
      * add new subfield to an existing field
      * add new subfield to an nonexisting field
      * move a subfield
      * move an entire field
      * copy a subfield
      * copy an entire field
    - import a biblio and use this template
    - verify the imported biblio matches actions defined.
    
    Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
    Signed-off-by: default avatarMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
    Signed-off-by: default avatarTomas Cohen Arazi <tomascohen@gmail.com>
    c7d862bb