Skip to content
  • joubu's avatar
    Bug 13215: The same letter code can be used for several libraries · 6f599652
    joubu authored and Tomas Cohen Arazi's avatar Tomas Cohen Arazi committed
    This patch fixes a major issue introduced by the
    commit 5c4fdcf7
    
     Bug 11742: A letter code should be unique.
    
    The interface should let the possibility to create a default template
    letter and some specific ones, with the same letter code (letter.code).
    
    The patches submitted on bug 11742 tried to fix an issue based on a
    (very bad) assumption: letter.code should be considered as a primary key and
    should be uniq.
    
    This patch reintroduces this behavior.
    Note that the interface will block a letter code used in different
    module (this is consistent not to have the same letter code used for different
    needs).
    
    This patch is absolutely not perfect, it just tries to change as less
    change as possible and to use new tested subroutines.
    
    Test plan:
    1/ Verify that the problem raised on bug 11742 does not appears anymore.
    2/ Verify there are no regression on adding, editing, copying, deleting
    letters.
    3/ Verify you are allowed to create a default letter template with a letter
    code and to reuse for a specific letter (i.e. for a given library).
    
    Signed-off-by: default avatarChris Cormack <chris@bigballofwax.co.nz>
    
    Signed-off-by: default avatarKatrin Fischer <katrin.fischer.83@web.de>
    Signed-off-by: default avatarTomas Cohen Arazi <tomascohen@gmail.com>
    6f599652