Reporting change in title count in a package
(ERM-392)
|
|
| 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: |
|
||||||||||||||||
| Issue links: |
|
||||||||||||||||
| 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 |