Fix KBART export to prefer electronic ISSN in journal URLs#81
Draft
Fix KBART export to prefer electronic ISSN in journal URLs#81
Conversation
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update URL for 'Revista española de sanidad penitenciaria' in KBART
Fix KBART export to prefer electronic ISSN in journal URLs
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KBART export was generating invalid URLs for journals that transitioned from print to electronic-only. The journal "Revista española de sanidad penitenciaria" in SciELO Spain now uses electronic ISSN
2013-6463but the export still referenced the obsolete print ISSN1575-0620in URLs, resulting in 404s.Changes
export/kbart.py: Added_generate_journal_url()method that usesjournal.any_issn(priority='electronic')instead ofjournal.scielo_issnexport/kbart.py: Updatedfmt_csv()to call new method instead ofdata.url().replace('sci_serial', 'sci_issues')tests/test_kbart.py: Added unit tests for URL generation logicTechnical Details
The original code relied on
data.url()from xylose, which usesscielo_issn(v400 field) that may contain the print ISSN for legacy journals. The fix leverages xylose's existingany_issn()method with electronic priority:This ensures correct ISSN selection while maintaining backward compatibility—journals with only print ISSN continue to work as before.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.