angular MARC editor tab does not display record source value

Bug #1927870 reported by Mary Llewellyn
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.10
Fix Released
Medium
Unassigned
3.11
Fix Released
Medium
Unassigned

Bug Description

in the MARC edit tab in the experimental staff catalog, while the field for the Record Source is displayed, it does not display the value. Instead, it says "Select a source." The same record viewed in the traditional view shows the value assigned to the record (in my example "OCLC").

Version 3.5.4

Attaching an example.

Revision history for this message
Mary Llewellyn (mllewell) wrote :
  • MARC edit.docx Edit (841.2 KiB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
summary: - angular MARC editor tab does not display record source
+ angular MARC editor tab does not display record source value
Garry Collum (gcollum)
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Mary Llewellyn (mllewell) wrote :

Further description: if the search results in a list, the first record does not display the record source, but when I page to the next record, the source is filled in. If I go back to the previous (first) record, the source is also displayed on the record.

If the search results in a single record, the source does not display at all.

Revision history for this message
Mary Llewellyn (mllewell) wrote :

Adding to say I see this in 3.5 and 3.6.

Revision history for this message
Tiffany Little (tslittle) wrote :

I still see this is in current master (3.11-ish).

tags: added: cat-marc cataloging
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Just noticed this on 3.11.

I think it is a timing issue between the combobox being initialized and and value from the record being applied.

With multiple results, after paging to the next result, the combox isn't being re-created, it already exits when the current record value gets set.

Or maybe the bib info to provide this.recordSource isn't available when the retrieveAll('cbs') call completes and tries to set it.

The sorting does seem to be taking effect fine.

Code is at:
https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts;hb=HEAD#l135

and
https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.html;hb=HEAD#l49

I'm reading up on promises and async pipes, to let the template wait until the retrieveAll is fully done.. if that is the issue.

Josh

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

The this.recordSource never does get set anywhere, so that part of the ngOnInit doesn't really do anything.

Now I think this issue is that the fromId() function completes before the bib source data loads, and that is where the source from the current record gets applied to the sourceSelector combobox.

So maybe fromID just needs to set a value for this.recordSource as well as trying to update the combobox directly. That way if the combobox data gets loaded later, it will set the correct source.

I'll give it a try.
Josh

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Another aspect of this bug is that when paging through results, If you have bibs with no source set, they will show up with the same source as the previous viewed record, since no attempt is made to unset the combobox in that situation.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Should it be possible to clear the source from a record, to go back to having no source, after you set a source? I'm not sure that is possible now.

And I'm fairly sure that the fact that the source isn't set back to undefined between switching to the next bib could cause a source from a previous bib in the results list to be applied to the next bib if that next bib has no source set and gets saved after being viewed.

Here is a branch that fixes:

1. No source showing when a single result is viewed, or the first result in a list.
2. Null source not getting set when switching between bibs that have a source and don't have a source.

Well... I don't have a good branch setup right now for main, but here is my commit to our custom branch. I'll get this moved to a working branch as soon as I have a chance.

https://gitlab.com/LARL/evergreen-larl/-/commit/d17339fb8c8535b66a017ccba4f6b722fb669455

Josh

Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

Could comment #7 be related to whatever is causing the fixed fields grid not to update as you page through records? https://bugs.launchpad.net/evergreen/+bug/2015163

Changed in evergreen:
assignee: nobody → Stephanie Leary (stephanieleary)
Changed in evergreen:
assignee: Stephanie Leary (stephanieleary) → nobody
Revision history for this message
Mike Rylander (mrylander) wrote :

I've pushed a branch to modernize the way we use eg-combobox for the source selector, which simplifies the MARC editor code a little, and lets the selector work as intended.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/miker/lp-1927870-fix-marc-source-selector

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.12-beta
Revision history for this message
Stephanie Leary (stephanieleary) wrote :

Bug 2015163 is unrelated, but Bill has proposed a fix for it and we are testing that now.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I've tested Mike's branch, and it does set the source to the correct value when I load a single record with a source set, or when I page through results and get to a record with the source set.

But it doesn't reset the source back to unselected when paging through results that have the source set and not set(null).

Here is a signoff branch that adds that.
user/stompro/lp-1927870-fix-marc-source-selector-handlenull

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/stompro/lp-1927870-fix-marc-source-selector-handlenull

Josh

Revision history for this message
Mike Rylander (mrylander) wrote :

Thanks, Josh. I should have removed even more! ;)

Assigning to myself for final testing and merging in the morning.

Changed in evergreen:
assignee: nobody → Mike Rylander (mrylander)
Revision history for this message
Mike Rylander (mrylander) wrote (last edit ):

I've pulled Josh's and my commits into main for 3.12, rel_3_10, and rel_3_9, all without conflict.

Thanks, Josh and all!

EDIT: I also pulled the commits into rel_3_11. Apologies for the comment oversight!

Changed in evergreen:
assignee: Mike Rylander (mrylander) → nobody
status: Confirmed → Fix Committed
tags: added: signedoff
Revision history for this message
Andrea Neiman (aneiman) wrote :

Updated LP targets after confirming with Mike that this was also in rel_3_11.

Did not add target for rel_3_9 because that is closed in LP.

Changed in evergreen:
importance: Undecided → Medium
no longer affects: evergreen/3.9
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.