Context
Follow-up from QA of the call transcription/summary feature, point 8 of #7143.
Problem
In CTI History, filtering by content = Transcription returns no (or too few) results: calls that have a transcription and a summary are not shown. Since a summary is generated from the transcription, most transcribed calls also have a summary, so the filter looks broken.
Root cause
nethcti-middleware server-side artifact filter excludes any row that also has a summary:
methods/history.go:338
if artifact == historyArtifactTranscription && item.HasTranscription && !item.HasSummary {
HasTranscription and HasSummary are independent flags (a call can have both). The !item.HasSummary guard makes the Summary and Transcription filters mutually exclusive, but the Transcription filter should return all calls that have a transcription — consistent with the UI, where the View transcription action is shown whenever state === 'done' && (hasSummary || hasTranscription).
Proposed fix
Drop the && !item.HasSummary condition so the Transcription filter matches any row with HasTranscription. Add a regression test covering a row with both summary and transcription.
Impacted repos
Context
Follow-up from QA of the call transcription/summary feature, point 8 of #7143.
Problem
In CTI History, filtering by content = Transcription returns no (or too few) results: calls that have a transcription and a summary are not shown. Since a summary is generated from the transcription, most transcribed calls also have a summary, so the filter looks broken.
Root cause
nethcti-middlewareserver-side artifact filter excludes any row that also has a summary:methods/history.go:338HasTranscriptionandHasSummaryare independent flags (a call can have both). The!item.HasSummaryguard makes the Summary and Transcription filters mutually exclusive, but the Transcription filter should return all calls that have a transcription — consistent with the UI, where the View transcription action is shown wheneverstate === 'done' && (hasSummary || hasTranscription).Proposed fix
Drop the
&& !item.HasSummarycondition so the Transcription filter matches any row withHasTranscription. Add a regression test covering a row with both summary and transcription.Impacted repos
nethcti-middleware(fix)