Skip to content

fix: envelope visible elements validation#6918

Merged
vitormattos merged 11 commits intomainfrom
fix/envelope-visible-elements-validation
Feb 17, 2026
Merged

fix: envelope visible elements validation#6918
vitormattos merged 11 commits intomainfrom
fix/envelope-visible-elements-validation

Conversation

@vitormattos
Copy link
Member

No description provided.

ValidateHelper::validateSignerIsOwnerOfPdfVisibleElement() was rejecting
visible elements that belong to child sign requests of an envelope.
When signing an envelope, the documentElement.signRequestId points to the
child file sign request, not the envelope-level sign request. This caused
'Invalid data to sign file' error.

Also fixes validateUserHasNecessaryElements() which queried file elements
by envelope fileId/signRequestId returning empty results for envelopes,
since elements belong to child files.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
FileService::loadVisibleElements() only queried the envelope file ID,
missing all visible elements that belong to child files. Now queries
child file IDs and uses per-child metadata for coordinate calculation.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Adds testValidateVisibleElementsRelationAcceptsEnvelopeChildElements
which verifies that visible elements belonging to child sign requests
are accepted when signing an envelope document.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Adds testEnvelopeVisibleElementsIncludesChildFileElements which verifies
that FileService::loadVisibleElements() includes elements from child
files when processing an envelope document.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update testGetJobArgumentsWithoutCredentialsIncludesContext to set
'elements' property instead of 'elementsInput', matching the current
getJobArgumentsWithoutCredentials() implementation. Also use real
entities instead of mocks for classes with final getId().

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Sign.vue elements() and needCreateSignature computed properties only
matched against the single envelope-level signRequestId. Now collects
all child file signRequestIds (where me:true) into a Set, so visible
elements from child files are correctly displayed in the sidebar.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
SignPDF.vue loadEnvelopePdfs() now populates signStore.document.files
with envelope child file data so downstream components can access
child file signers and visible elements.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
getVisibleElementsFromDocument() now also collects visible elements
from document.files entries, covering envelope documents where elements
are stored in child file signers.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Tests that elements() computed collects signRequestIds from child file
signers and correctly filters visible elements for envelope documents.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Tests getVisibleElementsFromDocument() for both regular documents and
envelope documents with child files containing visible elements.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Tests that loadEnvelopePdfs() populates signStore.document.files
with child file data from envelope responses.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos added this to the Next Major (34) milestone Feb 17, 2026
@vitormattos vitormattos self-assigned this Feb 17, 2026
@github-project-automation github-project-automation bot moved this to 0. Needs triage in Roadmap Feb 17, 2026
@vitormattos
Copy link
Member Author

/backport to stable32

@vitormattos
Copy link
Member Author

/backport to stable33

@vitormattos vitormattos merged commit 35c1c7a into main Feb 17, 2026
70 checks passed
@vitormattos vitormattos deleted the fix/envelope-visible-elements-validation branch February 17, 2026 04:14
@github-project-automation github-project-automation bot moved this from 0. Needs triage to 4. to release in Roadmap Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

1 participant