Bug 23926

Summary: In EDI Order limit GIR segment to five pieces of information
Product: Koha Reporter: Colin Campbell <colin.campbell>
Component: AcquisitionsAssignee: Colin Campbell <colin.campbell>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, kyle, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Circulation function:
Bug Depends on:    
Bug Blocks: 27708    
Attachments: Patch correcting GIR format and test cases
Bug 23926 Limit GIR segment to 5 pieces of info

Description Colin Campbell 2019-10-30 12:19:40 UTC
In the specification for the GIR segment it states

If there are more than five items of information for one
copy or for one part order, the segment may be repeated with the same copy or part-order sequence number in DE 7297

This was something we initially did not need to do as we have limited locations to store GIR data. This is no longer the case as some sites are using this for other data codes, so we need to implement the standard format
Comment 1 Colin Campbell 2019-10-30 12:48:26 UTC
note some suppliers' software cannot process orders containing incorrectly formatted GIR segments
Comment 2 Colin Campbell 2019-10-30 12:51:44 UTC
Created attachment 94874 [details] [review]
Patch correcting GIR format and test cases

To test - Tests of the functionality in t/Ediorder.t, as routine does not require db connection can run in a development environment
Comment 3 Martin Renvoize (ashimema) 2020-03-09 09:53:47 UTC
Adding Kyle to the CC list as one of the few other people out there able to work on and test EDI patches.
Comment 4 Kyle M Hall (khall) 2020-03-09 11:02:09 UTC
(In reply to Martin Renvoize from comment #3)
> Adding Kyle to the CC list as one of the few other people out there able to
> work on and test EDI patches.

This change will not affect the EDI plugins I maintain. In fact, in my plugins I made the GIR subfield limit configurable, as some vendors require the 5 field limit and so do not.
Comment 5 Kyle M Hall (khall) 2020-03-09 11:19:24 UTC
Created attachment 100338 [details] [review]
Bug 23926 Limit GIR segment to 5 pieces of info

Strictly if a GIR segment contains more than 5 pieces
of information the it should be encoded in repeated
segments each of 5 elements or less each sharing the same
copy sequence number

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Martin Renvoize (ashimema) 2020-03-09 12:17:41 UTC
I'm going to knock this one up to PQA as the two people most authoritative about EDI have now been involved :)
Comment 7 Martin Renvoize (ashimema) 2020-03-10 15:17:42 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2020-04-02 20:35:00 UTC
I get a Fail on qa when applying this patch

FAIL   Koha/Edifact/Order.pm
   OK     critic
   OK     forbidden patterns
   OK     git manipulation
   OK     pod
   OK     pod coverage
   FAIL   spelling
                 dont  ==> don't
                 dont  ==> don't
                 dont  ==> don't
                 dont  ==> don't
   OK     valid

not backporting to 19.11.x