Skip to content

Commit eaa895c

Browse files
matteiusclaude
andcommitted
fix: render all stage-scoped fields in Approval Step Responses
_build_approval_step_sections was skipping any field whose value was absent from form_data, which meant approvers who left fields blank left orphan section headers on the approval page, submission detail, and PDF exports — the designed section/field structure silently collapsed down to just the headers. Stage-scoped fields now always render with their configured layout, and fields the approver left blank render with an empty value cell. Covers every surface that uses _build_approval_step_sections. Bumps version to 0.71.1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5dbff23 commit eaa895c

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.71.1] - 2026-04-16
11+
12+
### Fixed
13+
- **Approval Step Responses no longer drops unfilled fields.** Stage-scoped
14+
fields whose values were absent from `form_data` (i.e. the approver left
15+
them blank) were being filtered out of the per-stage sections, leaving
16+
section headers with nothing beneath them. Fields defined on a stage now
17+
always render — absent values show as empty — so the form designer's
18+
section/field structure is preserved on the approval page, submission
19+
detail, and PDF exports regardless of which fields the approver
20+
actually filled in.
21+
1022
## [0.71.0] - 2026-04-16
1123

1224
### Added

django_forms_workflows/views.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,9 +3411,12 @@ def _build_approval_step_sections(submission):
34113411
)
34123412
continue
34133413
lookup_key = f"{f['key']}_{swi_index}" if swi_index else f["key"]
3414-
if lookup_key not in form_data:
3415-
continue
3416-
raw_value = form_data[lookup_key]
3414+
# Always render stage-scoped fields so the section structure the
3415+
# form designer configured is preserved. Fields the approver
3416+
# left blank render with an empty value rather than being
3417+
# dropped (which left orphan section headers with nothing
3418+
# beneath them).
3419+
raw_value = form_data.get(lookup_key, "")
34173420
field_type = f.get("field_type", "")
34183421
if field_type == "currency" and raw_value not in (None, ""):
34193422
try:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-forms-workflows"
3-
version = "0.71.0"
3+
version = "0.71.1"
44
description = "Enterprise-grade, database-driven form builder with approval workflows and external data integration"
55
license = "LGPL-3.0-only"
66
readme = "README.md"

0 commit comments

Comments
 (0)