From d80f8e8ec6a76a7a68b4d8a0c4d6a5761722986f Mon Sep 17 00:00:00 2001 From: jubilee2 Date: Sun, 11 Jan 2026 21:47:54 +0000 Subject: [PATCH 1/2] Allow data_access_group field in user import to preserve DAG If data_access_group is excluded from user import, REDCap interprets the absence as the user having no DAG, causing DAG assignments to be lost on every import. Including this field preserves existing DAG assignments when updating user records via the API. --- R/prepUserImportData.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/prepUserImportData.R b/R/prepUserImportData.R index e6b6e6b1..68ad5be2 100644 --- a/R/prepUserImportData.R +++ b/R/prepUserImportData.R @@ -115,7 +115,7 @@ prepUserImportData <- function(data, # Remove fields that cannot be updated fields_to_remove <- c("email", "lastname", "firstname", - "data_access_group_id", "data_access_group") #?, "data_access_groups") + "data_access_group_id") data <- data[!names(data) %in% fields_to_remove] # Convert values to numeric From f9efcaf36df63aacd9d49d29fd2cc044b137fbcd Mon Sep 17 00:00:00 2001 From: Shawn Garbett Date: Mon, 12 Jan 2026 11:06:09 -0600 Subject: [PATCH 2/2] Update NEWS.md --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index eceebd7b..47373e8f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ * `importMetaData` bug fix when given duplicate names to exit and warn user properly. * `redcapUserRoleStructure` allows new `alerts`, `api_modules`, and `data_quality_resolution` attributes. * `exportUsers` properly handles the columns random_setup, random_dashboard and random_perform. +* `importUsers` data_access_group is no longer excluded from user import. This caused issues with removing DAG assignments on imports. ## DEPRECATION NOTICES