Skip to content

Merge new changes into main branch - #75

Merged
kaitlynhair merged 16 commits into
masterfrom
dev
Jan 13, 2026
Merged

kaitlynhair merged 16 commits into
masterfrom
dev

Conversation

@kaitlynhair

Copy link
Copy Markdown
Member
  • Fixed issue with analytics tracking link in shiny app
  • Improvements to XML import of Keywords and Reference Type
  • Improvements to RIS export - Author separation
  • Fixed bug in Tab Delimited export with repeated URLs

Comment thread R/load_refs.R
"Abstract" = "abstract",
"Custom.1" = "record_id",
"ISBN.ISSN" = "isbn",
"Url" = "url"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The tab-delimited import logic in load_multi_search looks for a Url column, but the export creates a URL column, causing URL data to be lost on import.
Severity: HIGH

🔍 Detailed Analysis

Exporting citations to a tab-delimited file via write_citations_app creates a column named URL. When this file is re-imported using load_multi_search with method="txt", the import logic attempts to find and rename a column named Url (mixed case) to url (lowercase). Due to case sensitivity, the URL column is not found and is not renamed. Consequently, a new, empty url column is created, and the original URL data from the URL column is lost. This breaks the round-trip data integrity for tab-delimited files.

💡 Suggested Fix

Modify the name_map in load_multi_search to handle the uppercase URL column name. For example, change the mapping from "Url" = "url" to "URL" = "url" to match the column name produced by the export function.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: R/load_refs.R#L321

Potential issue: Exporting citations to a tab-delimited file via `write_citations_app`
creates a column named `URL`. When this file is re-imported using `load_multi_search`
with `method="txt"`, the import logic attempts to find and rename a column named `Url`
(mixed case) to `url` (lowercase). Due to case sensitivity, the `URL` column is not
found and is not renamed. Consequently, a new, empty `url` column is created, and the
original URL data from the `URL` column is lost. This breaks the round-trip data
integrity for tab-delimited files.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8548464

@kaitlynhair
kaitlynhair merged commit df54be9 into master Jan 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant