Reporting change in title count in a package (ERM-392)

[ERM-405] Local KB Admin | Add info logging for number of titles new to a package Created: 11/Aug/19  Updated: 13/Nov/19  Resolved: 13/Nov/19

Status: Closed
Project: ERM Platform
Components: None
Affects versions: None
Fix versions: None
Parent: Reporting change in title count in a package

Type: Sub-task Priority: TBD
Reporter: Owen Stephens Assignee: Owen Stephens
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File Screenshot 2019-09-19 at 10.58.02.png     PNG File Screenshot 2019-09-19 at 11.01.30.png    
Issue links:
Cloners
clones ERM-402 Local KB Admin | Add info logging for... Closed
is cloned by ERM-403 Local KB Admin | Standardise info log... Closed
is cloned by ERM-404 Local KB Admin | Add info logging for... Closed
Sprint: ERM Sprint 74, ERM Sprint 75, ERM Sprint 76, ERM Sprint 72, ERM Sprint 73

 Description   

On package data being processed from an external source (e.g. GOKb sync or File Upload), in the Info Log the total number of titles (e-resources) being added to the package by the job (i.e. new PCI created) in the Info Log



 Comments   
Comment by Owen Stephens [ 19/Sep/19 ]

steve.osguthorpe I'm seeing a log entry for number of titles added but it is always zero - couple of examples attached. One is a new package with 5 titles - you can see 5 titles processed, but zero added - but all 5 were added.

Also tested with adding a single extra title to an existing package (the one created by the previous upload with 5 titles) - which again processed 6 titles but has zero added

Comment by Owen Stephens [ 04/Nov/19 ]

Peter Böhm steve.osguthorpe I think one of the problems here might be that the code only increments the newTitles counter if pci.isDirty() (https://github.com/folio-org/mod-agreements/blob/master/service/grails-app/services/org/olf/PackageIngestService.groovy#L179) but isDirty() will return false for a newly created (rather than updated) object?

Comment by steve.osguthorpe [ 05/Nov/19 ]

Owen Stephens I would expect that isDIrty would be true for a new title where any field has been changed (i.e. from null to a value) so it should match new Items also. But it is definitely something that might be worth investigating, as the updated seems to be OK.

Comment by Owen Stephens [ 05/Nov/19 ]

I know this is in reference to an old version of Grails, but https://stackoverflow.com/questions/25650786/grails-2-4-3-isdirty-flag-not-set-on-new-domain-object suggests that isDirty isn't set to true for new object instances

Generated at Fri Feb 09 00:19:59 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.