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>