Editing call number for reserve item requires refresh

Bug #1907974 reported by Beth Willis
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Unassigned
3.8
Fix Released
Low
Unassigned

Bug Description

When associating an item with a course, there is an option to edit the item’s call number. If this option is selected, a new call number is entered and the “Add Material” button is selected, the new call number does not display in the grid on the Course Materials tab. The screen must be refreshed in order to see the updated call number.

EG 3-6-1

Changed in evergreen:
milestone: none → 3.6.2
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Confirmed! Pull request at user/sandbergja/lp1907974_refactor_course_item_updater

Here's a link: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/lp1907974_refactor_course_item_updater

Here are the testing notes from the commit message:

1) Go to Local Admin > Course List
2) Double click on a course
3) Go to the materials tab
4) Add an item by barcode, making sure to supply a temporary call
   number, and that the call number checkbox is checked.
5) Note that the grid on the right display's the item's old call number,
   not its new one.
6) Apply this patch.
7) Repeat step 4. Note that the temporary call number is reflected in
   the grid now.

tags: added: pullrequest
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Removing pullrequest for now, since I found an error.

tags: removed: pullrequest
Changed in evergreen:
milestone: 3.6.2 → 3.6.3
Changed in evergreen:
milestone: 3.6.3 → none
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Fixed the error that I found, and force-pushed the code to user/sandbergja/lp1907974_refactor_course_item_updater

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.6.3
Revision history for this message
Beth Willis (willis-a) wrote :

I tested this fix on Equinox Test Server #2. First, I created a new course. Then, I added two items to the course, assigning a temporary call number to each. The updated call number displayed on the course page without a manual refresh.

I am signing off on it with my name, Beth Willis, and my email address, <email address hidden>.

tags: added: signedoff
Changed in evergreen:
milestone: 3.6.3 → 3.6.4
Changed in evergreen:
milestone: 3.6.4 → 3.7.2
Changed in evergreen:
milestone: 3.7.2 → 3.7.3
Revision history for this message
Michele Morgan (mmorgan) wrote :

I'm getting an error compiling the angular files after applying the commit at the top of https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/lp1907974_refactor_course_item_updater

Here's the error:

Error: src/app/staff/share/course.service.ts:229:26 - error TS2345: Argument of type '(res: any) => Observable<any> | ((error: any, scheduler?: SchedulerLike) => Observable<never>)' is not assignable to parameter of type '(value: any, index: number) => ObservableInput<any>'.
  Type 'Observable<any> | ((error: any, scheduler?: SchedulerLike) => Observable<never>)' is not assignable to type 'ObservableInput<any>'.
    Type '(error: any, scheduler?: SchedulerLike) => Observable<never>' is not assignable to type 'ObservableInput<any>'.
      Property '[Symbol.iterator]' is missing in type '(error: any, scheduler?: SchedulerLike) => Observable<never>' but required in type 'Iterable<any>'.

229 ).pipe(switchMap(res => {
                             ~~~~~~~~

  node_modules/typescript/lib/lib.es2015.iterable.d.ts:51:5
    51 [Symbol.iterator](): Iterator<T>;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    '[Symbol.iterator]' is declared here.

tags: added: needswork
removed: pullrequest signedoff
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Wow, what a cryptic error for a simple solution. Instead of calling `throwError` and returning its results, I was trying to just return the function itself!

I pushed a small commit to fix that to the same branch, user/sandbergja/lp1907974_refactor_course_item_updater. It is also now rebased.

tags: added: pullrequest
removed: needswork
Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
no longer affects: evergreen/3.6
Changed in evergreen:
milestone: 3.7.3 → none
Revision history for this message
Gina Monti (gmonti90) wrote :

I, Gina Monti, sign off on this bug. The new call number displays in the Course Materials grid when a temporary call number is added.

tags: added: signedoff
Changed in evergreen:
milestone: none → 3.10-beta
milestone: 3.10-beta → 3.9.1
Michele Morgan (mmorgan)
Changed in evergreen:
assignee: nobody → Michele Morgan (mmorgan)
Revision history for this message
Michele Morgan (mmorgan) wrote :

Works great to fix an annoying problem for Course Reserve administrators!

Pushed to master, rel_3_9 and rel_3_8

Thanks Jane, Beth and Gina!

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Michele Morgan (mmorgan) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.