Bug 30130 - Allow setting EDI type at the vendor level
Summary: Allow setting EDI type at the vendor level
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords: Manual-updated
Depends on:
Blocks:
 
Reported: 2022-02-18 13:38 UTC by Martin Renvoize
Modified: 2022-06-08 22:11 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
There are two predominant competing EDI standards, EDItEUR and BiC, with subtle differences in how they interpret some EDI message fields. This patch allows administrators to pick which standard the Vendor is conforming to rather than using a hardcoded and un-maintained SAN mapping in the module.
Version(s) released in:
22.05.00


Attachments
Bug 30130: Add standard to edi account definition (8.29 KB, patch)
2022-02-18 14:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30130: (follow-up) Set BiC for 'Ulverscroft' (1.05 KB, patch)
2022-02-18 14:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30130: (QA follow-up) Move description to template (2.01 KB, patch)
2022-02-21 12:09 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30130: Add standard field to edi_account (2.16 KB, patch)
2022-02-21 16:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30130: DBIC Update (1.66 KB, patch)
2022-02-21 16:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30130: Use new standard field in account definition (5.29 KB, patch)
2022-02-21 16:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30130: (follow-up) Set BiC for 'Ulverscroft' (1.05 KB, patch)
2022-02-21 16:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30130: Unit tests (2.02 KB, patch)
2022-02-21 16:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30130: Add standard field to edi_account (2.21 KB, patch)
2022-02-21 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30130: DBIC Update (1.71 KB, patch)
2022-02-21 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30130: Use new standard field in account definition (5.34 KB, patch)
2022-02-21 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30130: (follow-up) Set BiC for 'Ulverscroft' (1.10 KB, patch)
2022-02-21 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30130: Unit tests (2.08 KB, patch)
2022-02-21 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30130: (QA follow-up) Fix permission on atomic update file (630 bytes, patch)
2022-02-21 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30130: Add standard field to edi_account (2.26 KB, patch)
2022-03-29 12:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30130: DBIC Update (1.77 KB, patch)
2022-03-29 12:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30130: Use new standard field in account definition (5.40 KB, patch)
2022-03-29 12:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30130: (follow-up) Set BiC for 'Ulverscroft' (1.15 KB, patch)
2022-03-29 12:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30130: Unit tests (2.14 KB, patch)
2022-03-29 12:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30130: (QA follow-up) Fix permission on atomic update file (687 bytes, patch)
2022-03-29 12:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30130: (QA follow-up) Fix tests (1.61 KB, patch)
2022-03-29 12:07 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2022-02-18 13:38:46 UTC
Currently, EDI has some codepaths that are different depending on a hard coded list of vendors that support the EDItEUR standard (as apposed to the BIC standard).

We should allow setting this flag at the vendor definition level in the UI
Comment 1 Martin Renvoize 2022-02-18 14:25:47 UTC
Created attachment 130852 [details] [review]
Bug 30130: Add standard to edi account definition

This patch add a 'standard' field to the edifact account configuration
area to allow setting the message standard as either 'EDItEUR' or 'BiC'.

This just replaces the currently hard coded hash of SAN's in
Koha::Edifact::Order to distinguish between the two standards instead of
requireing a bug submission per vender san we identify to be a BiC type
vendor.
Comment 2 Martin Renvoize 2022-02-18 14:40:18 UTC
Created attachment 130860 [details] [review]
Bug 30130: (follow-up) Set BiC for 'Ulverscroft'

The 'Ulverscroft' supplier is also a BiC follower, this patch adds their
SAN, 5013546031839, to the DB update.
Comment 3 Katrin Fischer 2022-02-19 19:45:26 UTC
1) Having the descriptions come from the .pl file doesn't sit well with me. Although I think in these cases a change for translation is probably unlikely. If something else was to be added, like an explanatory note, we for sure would need to move it out to the templates. Maybe we could consider moving it anyway for better coding practice?

2) I think QA would love some unit tests on the change in Order.pm

3) Schema change should have been a separate patch ;)

All those are not being blockers for my sign-off, but:

4) The summary table shows the code instead of the description. The form and the summary table should match up.

5) The atomic file needs the executable flag to be added (I had done this in a follow-up, but I think better you do it when fixing 4) )
Comment 4 Martin Renvoize 2022-02-21 12:09:51 UTC
Created attachment 130960 [details] [review]
Bug 30130: (QA follow-up) Move description to template
Comment 5 Martin Renvoize 2022-02-21 16:32:32 UTC
Created attachment 130966 [details] [review]
Bug 30130: Add standard field to edi_account

This patch add a 'standard' field to the edifact account configuration
table to allow setting the message standard as either 'EDItEUR' or 'BiC'.
Comment 6 Martin Renvoize 2022-02-21 16:32:36 UTC
Created attachment 130967 [details] [review]
Bug 30130: DBIC Update

This patch updates the DBIC schema's with the new 'standard' field.
Comment 7 Martin Renvoize 2022-02-21 16:32:40 UTC
Created attachment 130968 [details] [review]
Bug 30130: Use new standard field in account definition

This patch uses the new 'standard' field to in the edifact account
configuration area to allow setting the message standard as either
'EDItEUR' or 'BiC'.

This just replaces the currently hard coded hash of SAN's in
Koha::Edifact::Order to distinguish between the two standards instead of
requireing a bug submission per vender san we identify to be a BiC type
vendor.
Comment 8 Martin Renvoize 2022-02-21 16:32:46 UTC
Created attachment 130969 [details] [review]
Bug 30130: (follow-up) Set BiC for 'Ulverscroft'

The 'Ulverscroft' supplier is also a BiC follower, this patch adds their
SAN, 5013546031839, to the DB update.
Comment 9 Martin Renvoize 2022-02-21 16:32:50 UTC
Created attachment 130970 [details] [review]
Bug 30130: Unit tests

This patch adds a unit test for the internal 'beginning_of_message'
method in Koha::Edifact::Order to check that the vendor standard
parameter is being interpreted coorectly.

Test plan
1. Run the tests, they should pass
Comment 10 Martin Renvoize 2022-02-21 16:33:25 UTC
Patches split as requested, tests added as requested, translations moved as requested.. back to NSO
Comment 11 Katrin Fischer 2022-02-21 22:08:35 UTC
Created attachment 130991 [details] [review]
Bug 30130: Add standard field to edi_account

This patch add a 'standard' field to the edifact account configuration
table to allow setting the message standard as either 'EDItEUR' or 'BiC'.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2022-02-21 22:08:39 UTC
Created attachment 130992 [details] [review]
Bug 30130: DBIC Update

This patch updates the DBIC schema's with the new 'standard' field.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2022-02-21 22:08:44 UTC
Created attachment 130993 [details] [review]
Bug 30130: Use new standard field in account definition

This patch uses the new 'standard' field to in the edifact account
configuration area to allow setting the message standard as either
'EDItEUR' or 'BiC'.

This just replaces the currently hard coded hash of SAN's in
Koha::Edifact::Order to distinguish between the two standards instead of
requireing a bug submission per vender san we identify to be a BiC type
vendor.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2022-02-21 22:08:48 UTC
Created attachment 130994 [details] [review]
Bug 30130: (follow-up) Set BiC for 'Ulverscroft'

The 'Ulverscroft' supplier is also a BiC follower, this patch adds their
SAN, 5013546031839, to the DB update.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2022-02-21 22:08:53 UTC
Created attachment 130995 [details] [review]
Bug 30130: Unit tests

This patch adds a unit test for the internal 'beginning_of_message'
method in Koha::Edifact::Order to check that the vendor standard
parameter is being interpreted coorectly.

Test plan
1. Run the tests, they should pass

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2022-02-21 22:08:57 UTC
Created attachment 130996 [details] [review]
Bug 30130: (QA follow-up) Fix permission on atomic update file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Nick Clemens 2022-03-29 12:07:29 UTC
Created attachment 132404 [details] [review]
Bug 30130: Add standard field to edi_account

This patch add a 'standard' field to the edifact account configuration
table to allow setting the message standard as either 'EDItEUR' or 'BiC'.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 18 Nick Clemens 2022-03-29 12:07:33 UTC
Created attachment 132405 [details] [review]
Bug 30130: DBIC Update

This patch updates the DBIC schema's with the new 'standard' field.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 19 Nick Clemens 2022-03-29 12:07:37 UTC
Created attachment 132406 [details] [review]
Bug 30130: Use new standard field in account definition

This patch uses the new 'standard' field to in the edifact account
configuration area to allow setting the message standard as either
'EDItEUR' or 'BiC'.

This just replaces the currently hard coded hash of SAN's in
Koha::Edifact::Order to distinguish between the two standards instead of
requireing a bug submission per vender san we identify to be a BiC type
vendor.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 20 Nick Clemens 2022-03-29 12:07:40 UTC
Created attachment 132407 [details] [review]
Bug 30130: (follow-up) Set BiC for 'Ulverscroft'

The 'Ulverscroft' supplier is also a BiC follower, this patch adds their
SAN, 5013546031839, to the DB update.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 21 Nick Clemens 2022-03-29 12:07:43 UTC
Created attachment 132408 [details] [review]
Bug 30130: Unit tests

This patch adds a unit test for the internal 'beginning_of_message'
method in Koha::Edifact::Order to check that the vendor standard
parameter is being interpreted coorectly.

Test plan
1. Run the tests, they should pass

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 22 Nick Clemens 2022-03-29 12:07:47 UTC
Created attachment 132409 [details] [review]
Bug 30130: (QA follow-up) Fix permission on atomic update file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 23 Nick Clemens 2022-03-29 12:07:50 UTC
Created attachment 132410 [details] [review]
Bug 30130: (QA follow-up) Fix tests

Result was copied and pasted, needed to update check

Was passing objetc instead of standard field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 24 Fridolin Somers 2022-04-13 13:57:18 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄