KBART export omits column headers/field names
Description
CSP Request Details
CSP Rejection Details
Potential Workaround
Checklist
hideTestRail: Results
Activity
Ethan Freestone October 5, 2020 at 12:55 PM
I moved this over to just hard coding the names in. Since it's a standard we can assume it worn't change anytime soon and I think ordering is dealt with elsewhere
Peter Böhm October 2, 2020 at 4:00 PM
Changing the fields back to 'public' results in this error:
startup failed:
/home/peter/Server/folio/mod-agreements/service/src/main/groovy/org/olf/export/KBart.groovy: 23: Error during @AutoClone processing: 'excludes' property 'date_first_issue_online' does not exist.
@ line 23, column 1.
@AutoClone(excludes = ['date_first_issue_online', 'date_last_issue_online'])
^
/home/peter/Server/folio/mod-agreements/service/src/main/groovy/org/olf/export/KBart.groovy: 23: Error during @AutoClone processing: 'excludes' property 'date_last_issue_online' does not exist.
@ line 23, column 1.
@AutoClone(excludes = ['date_first_issue_online', 'date_last_issue_online'])
^
2 errors
Peter Böhm October 2, 2020 at 3:59 PM
Ethan's comment on the PR: https://github.com/folio-org/mod-agreements/pull/367#pullrequestreview-501224003
Peter Böhm October 2, 2020 at 1:27 PM
Most certainly the bug got introduced during Steve's refactoring for Grails 4: https://github.com/folio-org/mod-agreements/commit/c7b321074b4d8976bf5b4f80861973529356a33c#diff-9242ed5a2a22d8df2b85fa36f5674105
Because he removed the "public" keywords, the condition Claudia mentioned above is never met.
I changed the condition to "private" and it works for me but I'm unsure of any wider implications
Claudia Malzer September 28, 2020 at 7:41 PM
The error occurs because of this line
https://github.com/folio-org/mod-agreements/blob/98c40d29bf9e5926e241963eb00b215b2434a8fc/service/src/main/groovy/org/olf/export/KBart.groovy#L188
the two values are never equal
unfortunately I don't know what that code snippet is for and what is the correct way to change it
Overview:
Steps to Reproduce:
Add a resource (from internal KB) to an agreement
View agreement and open Agreement lines accordion
In "E-resources covered by this agreement", use "Export as ..." and choose KBART
Notice that exported KBART file contains no column headings/field names in the first row
Expected Results:
The KBART field names should be in the first row
Actual Results:
First row is empty - no field names
Additional Information:
This was working in the Goldenrod release. Wonder if this is a Grails 4 change?
Interested parties:
@Felix Hemme