Skip to content

Commit

Permalink
Fix error message in addForm.formSchema; Fix to default of deprecated…
Browse files Browse the repository at this point in the history
… parentIdColumn in importRecords(); Tests for the number of columns of deeply nested subforms and references and cycles with reference fields; documentation update
  • Loading branch information
nickdickinson committed Oct 15, 2024
1 parent a492f69 commit 952ad7c
Show file tree
Hide file tree
Showing 11 changed files with 1,246 additions and 19 deletions.
2 changes: 1 addition & 1 deletion R/forms.R
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ addForm.formSchema <- function(schema, parentId=NULL, folderId=NULL, ...) {
})

if (!is.null(result$code)&&result$code == "BAD_REQUEST") {
stop("The server returned 'BAD_REQUEST' when trying to add the form '%s' with id %s in database %s. Check the form schema and fields.")
stop(sprintf("The server returned 'BAD_REQUEST' when trying to add the form '%s' with id %s in database %s. Check the form schema and fields.",schema$label, schema$id, schema$databaseId))
}

# The API returns all affected forms, as well as the database tree.
Expand Down
2 changes: 1 addition & 1 deletion R/import.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#'
#' @importFrom utils head
#' @export
importRecords <- function(formId, data, recordIdColumn, parentRecordIdColumn, stageDirect = TRUE, progress = getOption("activityinfo.import.progress", default = TRUE), parentIdColumn = parentRecordId) {
importRecords <- function(formId, data, recordIdColumn, parentRecordIdColumn, stageDirect = TRUE, progress = getOption("activityinfo.import.progress", default = TRUE), parentIdColumn = parentRecordIdColumn) {
parentId <- NULL

schema <- activityinfo::getFormSchema(formId)
Expand Down
4 changes: 2 additions & 2 deletions man/allColumnStyle.Rd

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

4 changes: 2 additions & 2 deletions man/columnStyle.Rd

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

12 changes: 6 additions & 6 deletions man/createFormSchemaFromData.Rd

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

2 changes: 1 addition & 1 deletion man/idColumnStyle.Rd

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

9 changes: 6 additions & 3 deletions man/importRecords.Rd

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

2 changes: 1 addition & 1 deletion man/minimalColumnStyle.Rd

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

4 changes: 2 additions & 2 deletions man/prettyColumnStyle.Rd

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

Loading

0 comments on commit 952ad7c

Please sign in to comment.