]> git.evergreen-ils.org Git - Evergreen.git/commit
LP1837067: Fixing unsubscribed Observable in Replace Barcodes dialog
authorJane Sandberg <sandbej@linnbenton.edu>
Thu, 18 Jul 2019 15:22:35 +0000 (08:22 -0700)
committerJane Sandberg <sandbej@linnbenton.edu>
Fri, 19 Jul 2019 17:09:28 +0000 (10:09 -0700)
commit7ed4b2540cdfbbc4a0bc820631e9c080e500b575
tree20cf9d78927b79725ff6fe2e34feb7e7d174cff6
parent6e8a9b1224a48a3c5dd98584a378049eecf22179
LP1837067: Fixing unsubscribed Observable in Replace Barcodes dialog

To test:
1) In the experimental Angular staff catalog, open up a bib record.
2) Open the Holdings View tab.
3) Select several items.
4) Use the Actions for Selected Rows menu to Replace Barcodes
5) Change the first barcode to something recognizable. Click the
Replace Barcode button.
6) Note that the dialog opens again to ask you to replace the
barcode you just added.
7) Apply this patch.
8) Repeat steps 1-5.
9) Note that the dialog opens again to ask you to replace the next
barcode.

Also removes some unused imports, and consolidates two RxJS pipes that
were next to one another.

Bill's Additions:

Removes an unnecessary throwError which was called every time the dialog
completed.

NOTE: the source of the bug was that the Observable returned by
pcrud.search(...) was never subscribed-to, so it never fired.  Calling
.toPromise() forces the observable to execute.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/share/holdings/replace-barcode-dialog.component.ts