Fix label for "Read and Sign" envelopes in reports
Addressed an issue where the Signature Certificate report incorrectly displayed "Document signed" for "Read and Sign" envelopes. Added a new resource key, `DocumentSignedRaC`, with translations ("Read and confirmed" / "Gelesen und bestätigt") to resolve this.
Updated `ItemStatusTranslated` in `ReportItem.vb` to use the new key for "Read and Sign" envelopes (`EnvelopeTypeId == 2`) while retaining existing behavior for other envelope types. Leveraged `Envelope.IsReadAndConfirm()` to determine envelope type.
Pending tasks include adding the new resource key to resource files and updating `Model.Designer.cs` with a strongly-typed property. Testing instructions provided to verify correct label behavior.
This commit is contained in:
@@ -22,6 +22,7 @@ EndProject
|
|||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{134D4164-B291-4E19-99B9-E4FA3AFAB62C}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{134D4164-B291-4E19-99B9-E4FA3AFAB62C}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
COPILOT_CONTEXT.md = COPILOT_CONTEXT.md
|
COPILOT_CONTEXT.md = COPILOT_CONTEXT.md
|
||||||
|
fix-report-label-read-and-confirmed.md = fix-report-label-read-and-confirmed.md
|
||||||
FORM_APPLICATION_CONTEXT.md = FORM_APPLICATION_CONTEXT.md
|
FORM_APPLICATION_CONTEXT.md = FORM_APPLICATION_CONTEXT.md
|
||||||
RECEIVER_PDF_VIEWER_CONTEXT.md = RECEIVER_PDF_VIEWER_CONTEXT.md
|
RECEIVER_PDF_VIEWER_CONTEXT.md = RECEIVER_PDF_VIEWER_CONTEXT.md
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
|
|||||||
135
fix-report-label-read-and-confirmed.md
Normal file
135
fix-report-label-read-and-confirmed.md
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
# Fix: Report Label "Read and confirmed" for Read and Sign Envelopes
|
||||||
|
|
||||||
|
## Status
|
||||||
|
?? **IN PROGRESS**
|
||||||
|
|
||||||
|
## Git Branch
|
||||||
|
```
|
||||||
|
fix/report-label-read-and-confirmed
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
In the **Signature Certificate report** (`Signierungszertifikat`), the history event
|
||||||
|
list always showed **"Document signed"** for status `DocumentSigned` (code `2005`) —
|
||||||
|
even when the envelope type was **"Read and Sign"** (`EnvelopeTypeId = 2`).
|
||||||
|
|
||||||
|
For "Read and Sign" envelopes the correct label must be **"Read and confirmed"**
|
||||||
|
(DE: **"Gelesen und bestätigt"**).
|
||||||
|
|
||||||
|
### Screenshot reference
|
||||||
|
The report shows a table with columns *Ereignis | Benutzer | Zeitstempel*.
|
||||||
|
The row with status 2005 displayed "Document signed" where "Read and confirmed"
|
||||||
|
was expected.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Root Cause
|
||||||
|
|
||||||
|
`ReportItem.ItemStatusTranslated` in
|
||||||
|
`EnvelopeGenerator.CommonServices\Jobs\FinalizeDocument\ReportItem.vb`
|
||||||
|
resolved the display label by calling:
|
||||||
|
|
||||||
|
```vb
|
||||||
|
My.Resources.Model.ResourceManager.GetString(ItemStatus.ToString())
|
||||||
|
```
|
||||||
|
|
||||||
|
There was **no branching logic** to handle the Read and Sign envelope type.
|
||||||
|
The same `DocumentSigned` key was always used regardless of envelope type.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
|
||||||
|
### Convention followed
|
||||||
|
The project already uses a `RaC` (**R**ead **a**nd **C**onfirm) suffix for
|
||||||
|
Read-and-Sign label variants across all resource files:
|
||||||
|
|
||||||
|
| Existing RaC keys |
|
||||||
|
|---|
|
||||||
|
| `DocumentRejectedRaC` |
|
||||||
|
| `EnvelopeReportCreatedRaC` |
|
||||||
|
| `MessageConfirmationSentRaC` |
|
||||||
|
|
||||||
|
### New resource key added: `DocumentSignedRaC`
|
||||||
|
|
||||||
|
| Resource file | Value |
|
||||||
|
|---|---|
|
||||||
|
| `Model.resx` (DE, default) | `Gelesen und bestätigt` |
|
||||||
|
| `Model.en.resx` (EN) | `Read and confirmed` |
|
||||||
|
|
||||||
|
### Logic change in `ReportItem.vb`
|
||||||
|
|
||||||
|
```vb
|
||||||
|
Public ReadOnly Property ItemStatusTranslated As String
|
||||||
|
Get
|
||||||
|
Dim oStatusKey = ItemStatus.ToString()
|
||||||
|
|
||||||
|
If ItemStatus = EnvelopeStatus.DocumentSigned AndAlso
|
||||||
|
Envelope IsNot Nothing AndAlso
|
||||||
|
Envelope.IsReadAndConfirm() Then
|
||||||
|
oStatusKey = "DocumentSignedRaC"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return My.Resources.Model.ResourceManager.GetString(oStatusKey)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
```
|
||||||
|
|
||||||
|
`Envelope.IsReadAndConfirm()` is defined in
|
||||||
|
`EnvelopeGenerator.Domain\Interfaces\IEnvelope.cs` and returns `true`
|
||||||
|
when `EnvelopeTypeId == 2`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Files Changed
|
||||||
|
|
||||||
|
| # | File | Change | Status |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 1 | `EnvelopeGenerator.CommonServices\Jobs\FinalizeDocument\ReportItem.vb` | Added `RaC` branching logic to `ItemStatusTranslated` | ? Done |
|
||||||
|
| 2 | `EnvelopeGenerator.Domain\Resources\Model.resx` | Added `DocumentSignedRaC` = `Gelesen und bestätigt` | ?? Pending |
|
||||||
|
| 3 | `EnvelopeGenerator.CommonServices\Strings\Model.resx` | Added `DocumentSignedRaC` = `Gelesen und bestätigt` | ?? Pending |
|
||||||
|
| 4 | `EnvelopeGenerator.CommonServices\Strings\Model.en.resx` | Added `DocumentSignedRaC` = `Read and confirmed` | ?? Pending |
|
||||||
|
| 5 | `EnvelopeGenerator.Domain\Resources\Model.Designer.cs` | Added `DocumentSignedRaC` strongly-typed property | ?? Pending |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## How to resume (for next agent)
|
||||||
|
|
||||||
|
All pending items are **resource file additions only**.
|
||||||
|
Each file needs one new `<data>` block inserted **directly after** the existing
|
||||||
|
`DocumentSigned` entry:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<data name="DocumentSignedRaC" xml:space="preserve">
|
||||||
|
<value>Gelesen und bestätigt</value> <!-- DE files -->
|
||||||
|
<!-- OR -->
|
||||||
|
<value>Read and confirmed</value> <!-- EN file -->
|
||||||
|
</data>
|
||||||
|
```
|
||||||
|
|
||||||
|
`Model.Designer.cs` also needs a new strongly-typed property added after
|
||||||
|
`DocumentSigned`:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Gelesen und bestätigt.
|
||||||
|
/// </summary>
|
||||||
|
public static string DocumentSignedRaC {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("DocumentSignedRaC", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
After changes, generate a Signature Certificate report for a **Read and Sign**
|
||||||
|
envelope and verify:
|
||||||
|
- History row with status 2005 shows **"Read and confirmed"** (EN)
|
||||||
|
- History row with status 2005 shows **"Gelesen und bestätigt"** (DE)
|
||||||
|
- Regular (non-RaC) envelopes still show **"Document signed"** / **"Dokument unterzeichnet"**
|
||||||
Reference in New Issue
Block a user