[open-ils-commits] [GIT] Evergreen ILS branch master updated. b9a15b047ceaebfa2ff8770706117df8c8647775

Evergreen Git git at git.evergreen-ils.org
Fri Mar 8 14:28:16 EST 2019


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 "Evergreen ILS".

The branch, master has been updated
       via  b9a15b047ceaebfa2ff8770706117df8c8647775 (commit)
      from  e7042035792377649f5862b8adce7820f29aebf7 (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 b9a15b047ceaebfa2ff8770706117df8c8647775
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Thu Oct 25 08:53:32 2018 -0400

    LP#1778571 Fix logic error converting JS bool to DB bool
    
    Two minor bugs in the Copy Notes editor had the same cause in two
    separate places. The cause was forgetting to convert the checkbox status
    (a JavaScript bool) to the correct database format ('t' or 'f'). The
    resulting symptoms were buggy behavior related to the state of the
    "Public Note" checkbox. This commit addresses both cases mentioned in
    the bug report and comments.
    
    To test the buggy behavior:
    1. Edit an item (e.g. click the "Edit" link from the client OPAC view).
    2. Click the "Item Notes" button (near the bottom of the editor).
    3. Add a new note and check the "Public Note" box.
    4. Click "OK".
    5. Click "Item Notes" again and notice that the "Public Note" box on your
       new note is no longer checked. (That's bug #1.)
    6. Check "Public Note" again, click "OK", and click "Save & Exit".
    7. Edit the same item again. Click "Item Notes".
    8. Your note should correctly have the "Public Note" checkbox checked.
    9. Uncheck the box and click "OK". Click "Save & Exit".
    10. Edit the same item. Click "Item Notes".
    11. Notice that your change didn't save. The "Public Note" checkbox is
        still checked. (That's bug #2.)
    
    To test the fixes:
    - Clear your browser cache.
    - Repeat the steps above, noticing that:
      - At step 5, the new note correctly has the "Public Note" checkbox
        checked.
      - At step 11, the edited note correctly has the "Public Note" checkbox
        unchecked.
    
    NOTE: Testing requires clearing the browser cache, since the
    t_copy_notes.tt2 file is fetched asynchronously by AngularJS.
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2
index 007dbcc9e8..ff2ab0fe01 100644
--- a/Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2
+++ b/Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2
@@ -61,7 +61,7 @@
             </div>
             <div class="col-md-3">
               <label>
-                <input type="checkbox" ng-model="pub" ng-change="n.pub(pub) && n.ischanged(1)" ng-disabled="deleted"/>
+                <input type="checkbox" ng-model="pub" ng-change="n.pub(pub ? 't' : 'f') && n.ischanged(1)" ng-disabled="deleted"/>
                 [% l('Public Note') %]
               </label>
             </div>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
index 0a85f4cd18..4b74018aa0 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
@@ -2092,7 +2092,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                             var n = new egCore.idl.acpn();
                             n.isnew(1);
                             n.creator(note.creator);
-                            n.pub(note.pub);
+                            n.pub(note.pub ? 't' : 'f');
                             n.title(note.title);
                             n.value(note.value);
                             n.owning_copy(cp.id());

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

Summary of changes:
 Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2 | 2 +-
 Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list