Hi, all.
The AtoM archival description CSV export allows you to optionally include descriptions which are descendants of the target description(s), and additionally to choose to export all descendant levels of description or only specific descendant levels of description.
After migration of our AtoM staging environment from 2.6.4 to 2.7.1, if you deselect “include all descendant levels of description” and choose one or more of the levels of description from the selector field, the selections are not respected, and instead all descendant levels of description are exported.
From the log of the export job, it appears that the levels of description are being passed:
[info] [2023-03-31 10:34:48] Job 2415581 "CSV export": Parameters: {"params":{"fromClipboard":true,"slugs":["anne-innis-dagg-fonds"]},"current-level-only":false,"public":false,"objectType":"informationObject","levels":{"639833":null,"221":null,"224":null},"name":"CSV export","id":"2415581"}
…and it appears the parameter is being correctly passed to the XML export job as well:
[info] [2023-03-31 10:37:06] Job 2415583 "XML export": Parameters: {"params":{"fromClipboard":true,"slugs":["anne-innis-dagg-fonds"]},"current-level-only":false,"public":false,"objectType":"informationObject","levels":{"639833":null,"221":null,"224":null},"name":"XML export","id":"2415583"}
...but the XML export correctly exports only the targeted levels of description and the CSV export doesn’t.
I *think* the issue might be in /lib/job/arInformationObjectCsvExportJob.class.php (https://github.com/artefactual/atom/blob/stable/2.7.x/lib/job/arInformationObjectCsvExportJob.class.php), at line 61. It triggers the export of descendant levels of object if the ‘current-level-only’ parameter isn’t selected, and is supposed to include the desired levels of description as a parameter to a getDescendantsForExport() function call. The code in qa-2.x (the development repo) populates this with a field called $options, but that field isn't defined anywhere in that function, or even anywhere in the class.
With some judicious debugging statements, I was able to figure out that "levels" was an array defined as a child attribute of $this in that function, but even hand-creating an array in place of $options that included what I thought were the appropriate values from $this didn't seem to work.
I'm hoping that a developer or a maintainer might be able to put some eyes on this, or at least start tracking it as a bug. I suspect I'm close to a fix, but the exact details of it elude me.
Brandon
Brandon Uhlman, Senior Systems Administrator and Analyst
Digital Initiatives, University of Waterloo Library
Phone: (519) 888-4567 ext. 43750
--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/YT2PR01MB4318B6C649BDE65A29A32272FD959%40YT2PR01MB4318.CANPRD01.PROD.OUTLOOK.COM.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/c4151c38-bed4-4ede-8889-e385c507fe55n%40googlegroups.com.