Bug 35971

Summary: Adding a patron/recipient to a routing list twice creates an error
Product: Koha Reporter: Christian Stelzenmüller <christian.stelzenmueller>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Christian Stelzenmüller 2024-02-01 12:42:19 UTC
If you try to add a patron or recipient twice to a routing list, it creates an error.

To test:
1.	Create a subscription
2.	Create a routing list.
3.	Click ‚Add recipients‘ to the routing list. 
4.	Search for a patron, and add them. Then, add the same person again.

Part of the error trace:

C4::Serials::addroutingmember(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '2-19' for key 'subscriptionid' at /kohadevbox/koha/serials/routing.pl line 69
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77