[koha-commits] main Koha release repository branch 3.8.x updated. v3.08.13-88-g4488ebf

Git repo owner gitmaster at git.koha-community.org
Tue Aug 20 11:02:20 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 3.8.x has been updated
       via  4488ebf7100a03f02fb919501cba86768da8d77c (commit)
      from  cdf6e36abebf4cf65df8e6ddd9aee039a43608e6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4488ebf7100a03f02fb919501cba86768da8d77c
Author: David Cook <dcook at prosentient.com.au>
Date:   Wed Jun 12 11:24:09 2013 +1000

    Bug 10448: can now change framework after duplicating bib record
    
    Changing the framework in the MARC editor immediately after duplicating
    a bib record no longer clears the fields.
    
    This patch changes the Changefwk Javascript function so that it passes
    the "op" value and the "biblionumberdata" (as the biblionumber) from
    addbiblio.pl back to itself, when submitting the form in order to
    change the framework.
    
    The reason we need to do this is because the form in addbiblio.tt
    is hard-coded to always submit an "op" value of "addbiblio". Currently,
    we need to have it hard-coded to "addbiblio", because all the magic
    happens in addbiblio.pl when there is an "op" of "addbiblio". If we
    always passed the "actual" "op" value, such as "duplicate", nothing
    would ever happen when we clicked "save". It seems to me that this
    is a flaw in the design of addbiblio.pl.
    
    If we pass the "op" and "biblionumber" when changing frameworks, we're
    able to tell addbiblio.pl that we're still wanting to "duplicate" this
    "X" biblionumber. However, by having the form still hard-coded to
    "addbiblio", when we hit save, the form will do the magic, check if
    it's a duplicate, and save the record (or prompt for action if it
    is a duplicate).
    
    --
    
    I also noticed that if you make changes to a record, then change
    the framework before saving, your changes get cleared (since the
    original record from the database is loaded when the page reloads).
    It seems to me that this is a bug. Changing the framework should
    change the layout while preserving the content. I think most users
    would assume that when changing the framework.
    
    This patch also introduces another hidden input into addbiblio.tt and
    the Changefwk Javascript called "changed_framework". Basically, if
    the Changefwk Javascript is run, it tells addbiblio.pl that the
    framework is changed, and it uses the posted data from the form
    (which we have been modifying) instead of reloading the record from
    the database.
    
    --
    
    Test Plan:
    
    A) Before Applying Patch:
    
    To Show That Changing the Framework Erases All Fields When
    Duplicating a Record:
    
    1) Go to any bib record
    2) Go to Edit > Edit as new (duplicate). You should see filled
    in fields.
    3) Change the framework to any other framework than the one
    that is currently specified.
    4) Note that every single field is now blank
    
    To Show That Changing the Record then Changing the Framework
    Ignores Changes, When Editing a Record
    
    5) Go to any bib record
    6) Go to Edit.
    7) Change the title of the record to "I've changed the title".
    8) Change the framework to any other framework than the one that is currently specified.
    9) Look at the title. You'll notice it is the original title, and NOT "I've changed the title".
    
    B) Apply the Patch
    
    Also, clear your memcache and shift+refresh your screen. You don't want to use cached templates/javascript.
    
    C) After Applying the Patch
    
    Repeat Steps 1-3 and 5-8.
    
    You should now notice that changing the framework when duplicating the item does not clear all the fields.
    
    You should also notice that any changes you make prior to changing the framework will still exist after changing it.
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit ca33b7fc635d93b3029831da7496372fb34c798f)
    Signed-off-by: Tomas Cohen Arazi <tomascohen at gmail.com>
    Works as expected.
    (cherry picked from commit 98e397d9a5c5cbd3d2aa88cd0044c24a7d75ff72)
    Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
    (cherry picked from commit 98e397d9a5c5cbd3d2aa88cd0044c24a7d75ff72)
    Signed-off-by: Chris Hall <followingthepath at gmail.com>
    (cherry picked from commit 502f35ea0a2405974d20a51ac2b42eb18fd1d4e2)

-----------------------------------------------------------------------

Summary of changes:
 cataloguing/addbiblio.pl                           |    6 +++++-
 .../prog/en/modules/cataloguing/addbiblio.tt       |    5 ++++-
 2 files changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list