Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# EMLeditor v1.2.1 (Development version)
## 2026-09-02
* Bug fix for `set_cross_references`. Make sure cross reference URL is added to metadata!

## 2026-08-05
* Update DESCRIPTION: move sf from Suggests to Imports. Hopefully fixes issues with `set_content_units` etc.
Expand Down
9 changes: 3 additions & 6 deletions R/editEMLfunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ set_cross_reference <- function(eml_object,
get_url <- if (dev) {
paste0(.ds_dev_api(), "ReferenceCodeSearch?q=", cross_ref_id[i])
} else {
paste0(.ds_api(), "ReferenceCodeSearch?q=", cross_ref_id[i])
paste0(.ds_secure_api(), "ReferenceCodeSearch?q=", cross_ref_id[i])
}

req2 <- httr::GET(get_url,
Expand All @@ -1782,7 +1782,7 @@ set_cross_reference <- function(eml_object,
cli::cli_abort(c("x" = msg))
return(invisible())
}
#get project information:
#get cross ref information:
rjson2 <- jsonlite::fromJSON(httr::content(req2, "text"))

if (rjson2$isDOI == "True") {
Expand All @@ -1792,10 +1792,7 @@ set_cross_reference <- function(eml_object,
}
cross_ref_type[i] <- rjson2$referenceType
cross_ref_title[i] <- rjson2$title

#cross_ref_url <- append(cross_ref_url, cross_url)
#cross_ref_type <- append(cross_ref_type, cross_type)
#cross_ref_title <- append(cross_ref_title, cross_title)
cross_ref_url[i] <- stringr::str_trim(cross_url)
}

build_cross_ref_items <- function(urls, titles, types) {
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/a01_prereqs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading