[Evergreen-dev] Updating Objects Via Web Client or Back-end

Jason Stephenson jason at sigio.com
Sun Oct 31 17:21:37 EDT 2021


Hello,

A question has arisen while I've been working on fixes for the following 
bugs:

* duplicate entries for a copy in asset.latest_inventory table 
https://bugs.launchpad.net/evergreen/+bug/1883171

* Inventory: Staff users can update inventory dates on non-owned items 
https://bugs.launchpad.net/evergreen/+bug/1940663

The do inventory process as presently implemented creates or updates an 
asset.latest_inventory (alci) object via the web client.  However, the 
base object is created in the back end circulation code using the Perl 
Fieldmapper and then returned via a module member that gets added to the 
return payload.

I am changing this to create a new, asset.copy_inventory (aci) object.

My inclination is to just call create_asset_copy_inventory on the editor 
to create the object via the back end. The object will not actually 
exist until the editor calls commit towards the end of checkin processing.

It just seems odd to me that an incomplete object would get sent from 
the back end to be completed by the front end code.

I wonder if anyone else has a preference?

I know that there are many caveats and trade offs of either method, and 
I'm willing to get into them later if anyone feels it necessary for the 
sake of discussion.

Jason Stephenson


More information about the Evergreen-dev mailing list