Skip to content

CP-12545 docuseal conversion bugfixes#60

Merged
ryanarakawa merged 4 commits intomainfrom
CP-12542/12545-docuseal-conversion-bugfixes
Mar 4, 2026
Merged

CP-12545 docuseal conversion bugfixes#60
ryanarakawa merged 4 commits intomainfrom
CP-12542/12545-docuseal-conversion-bugfixes

Conversation

@ryanarakawa
Copy link
Collaborator

@ryanarakawa ryanarakawa commented Mar 3, 2026

Summary

  • Adds audience parameter support to the POST /api/templates/pdf endpoint, mapping it to preferences['submitters_order'] with allowlist validation against known values
    (single_sided, employee_then_manager, manager_then_employee, simultaneous)
  • Adds :prefill to strong parameters for template fields, enabling the prefill field association to persist
  • Fixes display of compound prefill field names (e.g. manager_firstname → "Manager First Name") in the template builder

https://www.loom.com/share/fa10de01b7e5419793e397197e724ffe

* this is primarily for conversion from ATS to Docuseal, since these fields would normally just be updated through the Docuseal iframe itself
* use word map to properly display Firstname as First Name, Lastname as Last Name
@ryanarakawa ryanarakawa marked this pull request as ready for review March 3, 2026 19:29
Copy link
Collaborator

@bernardodsanderson bernardodsanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


def apply_audience(template, audience)
return if audience.blank?
return unless audience.in?(VALID_AUDIENCE_VALUES)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[optional] Not sure if we want any kind of warnings or logs if there's an invalid audience?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I can add a log!

I don't think we need to surface to the user in the UI. This would only be for the conversion process since preferences['submitters_order'] is set elsewhere for the actual UI.

@ryanarakawa ryanarakawa merged commit c81b1ea into main Mar 4, 2026
5 checks passed
@ryanarakawa ryanarakawa deleted the CP-12542/12545-docuseal-conversion-bugfixes branch March 4, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants