Allow editing of items attached to a course

Bug #1907927 reported by Beth Willis
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

Once you have added an item to a course, it is not possible to edit it. The "edit" option allows you only to edit the course to which the item is attached or its relationship (e.g. “required”, “optional”) to the course. Since it is possible to edit item attributes, including the circ modifier, item status and shelving location, when attaching an item to a course, I would expect to be able to edit these attributes after adding the item to the course.

See related bug: https://bugs.launchpad.net/evergreen/+bug/1907923

EG 3-6-1

Changed in evergreen:
assignee: nobody → MaryAnn Alexander (maryann-alexander)
Revision history for this message
MaryAnn Alexander (maryann-alexander) wrote (last edit ):
tags: added: pullrequest
Changed in evergreen:
assignee: MaryAnn Alexander (maryann-alexander) → nobody
Revision history for this message
Beth Willis (willis-a) wrote :

MaryAnn,

I have tested this code on one our servers. When I select the "Edit" link for an item on the list of course materials, I am directed to a blank page and not to the volume/copy editor.

In case it is useful, this is the error I see in the console:main.9f1d930756d4444641ac.js:1 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'staff/cat/volcopy/attrs/item/8710763'
Error: Cannot match any routes. URL Segment: 'staff/cat/volcopy/attrs/item/8710763'
    at ge.noMatchError (main.9f1d930756d4444641ac.js:1:491953)
    at o.selector (main.9f1d930756d4444641ac.js:1:491672)
    at o.error (main.9f1d930756d4444641ac.js:1:243702)
    at o._error (main.9f1d930756d4444641ac.js:1:221141)
    at o.error (main.9f1d930756d4444641ac.js:1:220938)
    at o._error (main.9f1d930756d4444641ac.js:1:221141)
    at o.error (main.9f1d930756d4444641ac.js:1:220938)
    at o._error (main.9f1d930756d4444641ac.js:1:221141)
    at o.error (main.9f1d930756d4444641ac.js:1:220938)
    at w._error (main.9f1d930756d4444641ac.js:1:221141)
    at T (polyfills.43263c9780d8bd51daa1.js:1:12874)
    at T (polyfills.43263c9780d8bd51daa1.js:1:12402)
    at polyfills.43263c9780d8bd51daa1.js:1:13683
    at l.invokeTask (polyfills.43263c9780d8bd51daa1.js:1:7920)
    at Object.onInvokeTask (main.9f1d930756d4444641ac.js:1:379337)
    at l.invokeTask (polyfills.43263c9780d8bd51daa1.js:1:7841)
    at i.runTask (polyfills.43263c9780d8bd51daa1.js:1:3329)
    at m (polyfills.43263c9780d8bd51daa1.js:1:9914)

Revision history for this message
Kyle Huckins (khuckins) wrote :

It looks like the Angular Volcopy editor wasn't implemented in 3.7, this will need to point to the AngularJS version

tags: removed: pullrequest
Kyle Huckins (khuckins)
Changed in evergreen:
assignee: nobody → Kyle Huckins (khuckins)
Revision history for this message
Kyle Huckins (khuckins) wrote :

As MaryAnn's been shifted to other clients, I've taken over the work on this one - I've pushed a branch here: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/khuckins/lp1907927-allow-editing-items-attached-to-course

This takes a different approach to the above, saving the temporary fields on the Course Material object in addition to the Copy. This should be particularly useful when used alongside 1895706.

There is one issue I'd like to get another set of eyes on - the grid refresh doesn't visually update the Call Number - a user must switch tabs or refresh to see that specific field update, which isn't ideal. I've tried a variety of approaches, and still run into issues with this particular field.

tags: added: pullrequest
Changed in evergreen:
assignee: Kyle Huckins (khuckins) → nobody
Revision history for this message
Beth Willis (willis-a) wrote :

EG 3-8-0

On the Course Materials page, when selecting and item and then choosing the option to "Edit Selected", a modal displays and the progress bar runs for a few seconds and then disappears. The modal remains open but no action can be taken.

Revision history for this message
Beth Willis (willis-a) wrote :

I've added a screenshot showing the modal.

Revision history for this message
Kyle Huckins (khuckins) wrote :

I'm having trouble replicating this - Just to check, the sql upgrade script is being applied?

I did notice a minor issue that shouldn't result in this issue, and have pushed an additional commit to fix it.

Michele Morgan (mmorgan)
Changed in evergreen:
milestone: none → 3.8.1
Revision history for this message
Beth Willis (willis-a) wrote :
Download full text (3.9 KiB)

I attempted to test this fix on https://bugsquash.mobiusconsortium.org/eg/staff. To test this code, it is first necessary to attach items to course. I created a course but was not able to attach an item to the course. The console shows the following:

pending count 1
opensrf_ws.js:72 pending count 1
4705.81c685bdbb10c36690f7.js:1 No cellTextGenerator provided for "terms_map"
ngOnInit @ 4705.81c685bdbb10c36690f7.js:1
6389.862b32c2669dde9d0a51.js:1 /staff/admin/local/asset/course_list
4705.81c685bdbb10c36690f7.js:1 No cellTextGenerator provided for "barcode"
ngOnInit @ 4705.81c685bdbb10c36690f7.js:1
4705.81c685bdbb10c36690f7.js:1 No cellTextGenerator provided for "title"
ngOnInit @ 4705.81c685bdbb10c36690f7.js:1
4705.81c685bdbb10c36690f7.js:1 No cellTextGenerator provided for "terms_map"
ngOnInit @ 4705.81c685bdbb10c36690f7.js:1
hs @ main.866a13fbc4a29fd32421.js:1
ti @ main.866a13fbc4a29fd32421.js:1
Bo @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
pv @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
$d @ main.866a13fbc4a29fd32421.js:1
detectChanges @ main.866a13fbc4a29fd32421.js:1
ngAfterContentInit @ main.866a13fbc4a29fd32421.js:1
hs @ main.866a13fbc4a29fd32421.js:1
ti @ main.866a13fbc4a29fd32421.js:1
Bo @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
pv @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
pv @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
pv @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
va @ main.866a13fbc4a29fd32421.js:1
Kb @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
ag @ main.866a13fbc4a29fd32421.js:1
detectChanges @ main.866a13fbc4a29fd32421.js:1
tick @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
invoke @ polyfills.a44bb45d84ca60a78096.js:1
onInvoke @ main.866a13fbc4a29fd32421.js:1
invoke @ polyfills.a44bb45d84ca60a78096.js:1
run @ polyfills.a44bb45d84ca60a78096.js:1
run @ main.866a13fbc4a29fd32421.js:1
next @ main.866a13fbc4a29fd32421.js:1
__tryOrUnsub @ main.866a13fbc4a29fd32421.js:1
next @ main.866a13fbc4a29fd32421.js:1
_next @ main.866a13fbc4a29fd32421.js:1
next @ main.866a13fbc4a29fd32421.js:1
next @ main.866a13fbc4a29fd32421.js:1
emit @ main.866a13fbc4a29fd32421.js:1
_h @ main.866a13fbc4a29fd32421.js:1
onHasTask @ main.866a13fbc4a29fd32421.js:1
hasTask @ polyfills.a44bb45d84ca60a78096.js:1
_updateTaskCount @ polyfills.a44bb45d84ca60a78096.js:1
_updateTaskCount @ polyfills.a44bb45d84ca60a78096.js:1
runTask @ polyfills.a44bb45d84ca60a78096.js:1
M @ polyfills.a44bb45d84ca60a78096.js:1
invokeTa...

Read more...

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

To follow up from Beth's comment, I also tried course reserves on that server I can't add items to a course either. I also can't assign terms to a course or course users.

When I try I get lots of console errors. I'm not sure if this fix is causing the issues or if it's one of the other two course reserves fixes on the test server.

Trying the add a course user:

main.866a13fbc4a29fd32421.js:1 open-ils.pcrud.create.acmcu failed! stat=500 msg=Severe query error -- see error log for more details
onmethoderror @ main.866a13fbc4a29fd32421.js:1
OpenSRF.Stack.handle_message @ opensrf.js:731
OpenSRF.Stack.push @ opensrf.js:693
OpenSRF.websocketConnection.onmessage @ opensrf.js:388
socket.onmessage @ opensrf_ws.js:78
Xe @ polyfills.a44bb45d84ca60a78096.js:1
invokeTask @ polyfills.a44bb45d84ca60a78096.js:1
onInvokeTask @ main.866a13fbc4a29fd32421.js:1
invokeTask @ polyfills.a44bb45d84ca60a78096.js:1
runTask @ polyfills.a44bb45d84ca60a78096.js:1
invokeTask @ polyfills.a44bb45d84ca60a78096.js:1
Z @ polyfills.a44bb45d84ca60a78096.js:1
D @ polyfills.a44bb45d84ca60a78096.js:1
09:26:21.320 main.866a13fbc4a29fd32421.js:1 ERROR Error: Uncaught (in promise): open-ils.pcrud.create.acmcu failed! stat=500 msg=Severe query error -- see error log for more details
    at V (polyfills.a44bb45d84ca60a78096.js:1:15889)
    at V (polyfills.a44bb45d84ca60a78096.js:1:15425)
    at polyfills.a44bb45d84ca60a78096.js:1:16736
    at T.invokeTask (polyfills.a44bb45d84ca60a78096.js:1:7131)
    at Object.onInvokeTask (main.866a13fbc4a29fd32421.js:1:156446)
    at T.invokeTask (polyfills.a44bb45d84ca60a78096.js:1:7052)
    at L.runTask (polyfills.a44bb45d84ca60a78096.js:1:2526)
    at M (polyfills.a44bb45d84ca60a78096.js:1:9129)
    at m.invokeTask [as invoke] (polyfills.a44bb45d84ca60a78096.js:1:8212)
    at Z (polyfills.a44bb45d84ca60a78096.js:1:20127)
rb @ main.866a13fbc4a29fd32421.js:1
handleError @ main.866a13fbc4a29fd32421.js:1
next @ main.866a13fbc4a29fd32421.js:1
__tryOrUnsub @ main.866a13fbc4a29fd32421.js:1
next @ main.866a13fbc4a29fd32421.js:1
_next @ main.866a13fbc4a29fd32421.js:1
next @ main.866a13fbc4a29fd32421.js:1
next @ main.866a13fbc4a29fd32421.js:1
emit @ main.866a13fbc4a29fd32421.js:1
(anonymous) @ main.866a13fbc4a29fd32421.js:1
invoke @ polyfills.a44bb45d84ca60a78096.js:1
run @ polyfills.a44bb45d84ca60a78096.js:1
runOutsideAngular @ main.866a13fbc4a29fd32421.js:1
onHandleError @ main.866a13fbc4a29fd32421.js:1
handleError @ polyfills.a44bb45d84ca60a78096.js:1
runGuarded @ polyfills.a44bb45d84ca60a78096.js:1
i.microtaskDrainDone @ polyfills.a44bb45d84ca60a78096.js:1
M @ polyfills.a44bb45d84ca60a78096.js:1
invokeTask @ polyfills.a44bb45d84ca60a78096.js:1
Z @ polyfills.a44bb45d84ca60a78096.js:1
D @ polyfills.a44bb45d84ca60a78096.js:1
09:26:21.322 main.866a13fbc4a29fd32421.js:1 open-ils.pcrud.create.acmcu failed! stat=500 msg=open-ils.pcrud: no object of class acmc found with primary key id of 3

Revision history for this message
Kyle Huckins (khuckins) wrote :

I'm not seeing the above errors on my local environment, even with bug 1929588 and bug 1913816 applied. Could there be an issue with the SQL applied to the server?

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

EG 3-8-0

The patch for this bug changes code that was also altered by LP# 1913604. Specifically, the course.service.ts file is affected. We have loaded the patch for LP# 1913604 on our test server. Because these two patches conflict, I cannot test this patch. Additional guidance is needed to enable application of both patches without conflict.

Jason Boyer (jboyer)
tags: added: needsrebase
tags: removed: pullrequest
Revision history for this message
Beth Willis (willis-a) wrote :

Confirming that this is still an issue in EG 3-11+.

Revision history for this message
Blake GH (bmagic) wrote :
tags: added: pullrequest
removed: needsrebase
no longer affects: evergreen/3.7
Changed in evergreen:
assignee: nobody → Jason Stephenson (jstephenson)
tags: removed: pullrequest
Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Thanks, Blake, for rebasing this branch.

I've had a look at the code and it does not appear to be complete to me.

The database upgrade script appears to be wrong and does not match the IDL changes completely. According to the IDL, the asset.course_modules_course_materials table should have links to asset.call_number and to config.copy_status but the database upgrade does not make references to those columns.

Furthermore, the changes to 040.schema.asset.sql do not match the final product of the upgrade script. A freshly created schema will differ from an upgraded schema.

I can't really speak to the JavaScript changes, but given the issues that I see in the database code, I don't think that they could possibly work.

tags: added: needswork
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I rebased the branch on main and resolved conflicts with the IDL changes. I added 1 commit to clean up the leading spaces to tabs since the IDL specifies the use of tabs and not spaces in he vim/Emacs comments.

The rebased branch is here:

working/collab/dyrcona/lp1907927-rebase2 (https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dyrcona/lp1907927-rebase2)

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.