burgerga / rspacer

RSpace API Wrapper
https://burgerga.github.io/rspacer/
Other
1 stars 1 forks source link

Rspacer cannot replace files when the template contains a missing field #10

Open hleegwater opened 2 weeks ago

hleegwater commented 2 weeks ago

I cannot replace a document using the Rspace API if there are missing numbers in the columnIndex, which is a parameter within fields. I tried replacing documents with other templates and it is fine if they have for example the LACDR-ISA - Study v1.0.0 template, but the Assay template does not work.

Screenshot of the error: image

Code that you can use to see that the columnIndex is missing some numbers.

library(rspacer)
template_id <- "SD260025" # LACDR-ISA - Assay (General) v1.0.0
template_file <- rspacer:::doc_get_fields(template_id) |> 
  relocate(columnIndex)
head(template_file)

gives: image

Using the field id instead, as described on https://community.researchspace.com/public/apiDocs > Documents > PUT did not solve the issue. I do not know why this error occurs and think that we should contact the people at Rspace.