ctsit / search_and_populate_data_from_another_project

REDCap Module to search another project for data to populate data into the current form
Other
5 stars 2 forks source link

detect and convert date(time) fields for target project's validation #17

Closed ChemiKyle closed 3 years ago

ChemiKyle commented 3 years ago

Close #16

Conversion is handled on the backend, so values will appear adjusted in the confirmation modal dialog as well.

ChemiKyle commented 3 years ago

Your comments are a bit confusing, REDCap stores all date(time) fields as ymd(hms) on the backend, the goal of this PR is to convert to the target field's validation type.

This also leads me to realize there are no test project XML files to set this up for testing! Normally PRs have a testing section, but since this was originally intended for Philip I was lazy.

To test:

  1. Set up Source and Target projects using APF's example project XML
  2. Enable this module on the target project, and map the fields in the "Test dates" form
  3. Fill in a handful of records in the Source project
  4. Return to the Target project, create a record, and attempt to use SAPDAP to clone any of the record(s) you created in the Source project