]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1778571 Fix logic error converting JS bool to DB bool
authorRemington Steed <rjs7@calvin.edu>
Thu, 25 Oct 2018 12:53:32 +0000 (08:53 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 8 Mar 2019 19:28:10 +0000 (14:28 -0500)
commitb9a15b047ceaebfa2ff8770706117df8c8647775
tree685e68a68a815da4e53ec768496de92bc8ba8b64
parente7042035792377649f5862b8adce7820f29aebf7
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@calvin.edu>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js