View Issue Details

IDProjectCategoryView StatusLast Update
20879DevelopmentSurvey participants (Tokens)public2026-11-20 17:36
Reporterc_schmitz Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary20879: Participant table: Store invitation, reminder and completion as datetime columns with a separate status field
Description

The participant table stores sent, remindersent and completed as string(17). Each column mixes a flag and a date: 'N', 'Y', 'Q' (completed only, ended by quota) or a date written as 'Y-m-d H:i' without seconds. Code has to check != 'N' everywhere, and the reminder selection compares dates as strings.

Proposed redesign (from the discussion in 05374):

  • Rename sent to invitation_sent and make it a datetime; NULL means no invitation was sent.
  • Rename remindersent to last_reminder_sent and make it a datetime; NULL means no reminder was sent.
  • Make completed a datetime, set only if the survey is not anonymized.
  • Add a status column for the completion state, so the state is no longer stored in the date column.

Open questions:

  • Status values: one-letter codes (N/Y/Q) or descriptive strings (not started, in progress, completed, quota, opted out)?
  • Should the completion date stay in the participant table at all, since the response already has it?
  • How to migrate rows that hold 'Y' without a date (an admin can set this by hand for sent and remindersent)?

Affected areas:

  • Token and TokenDynamic models, including the summary counts
  • Tokens controller (invitation and reminder sending, reminder selection), token_helper, DataEntry, RegisterController, frontend_helper (token completion on submit)
  • Participant edit form and mass update views
  • RemoteControl participant functions (field names change)
  • Participant CSV export/import and survey archives (old files must still import)
  • CPDB survey_links (date_invited, date_completed)

Migration: the DB update has to alter every existing participant table, so it must work on installations with many and very large tables. Column renames break plugins and scripts that read the table directly, so this is a breaking change for develop-major and needs a changelog entry.

TagsNo tags attached.

Relationships

related to 05374 closed Tokentable sent and completed fields are too small to hold a date/time field 

Users monitoring this issue

There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-11-20 17:36 c_schmitz New Issue
2026-11-20 17:36 c_schmitz Relationship added related to 05374