Skip to content

Jasper 818 - fix duplication of documents in judicial binders#1043

Merged
devinleighsmith merged 1 commit into
masterfrom
jasper-818
May 12, 2026
Merged

Jasper 818 - fix duplication of documents in judicial binders#1043
devinleighsmith merged 1 commit into
masterfrom
jasper-818

Conversation

@devinleighsmith
Copy link
Copy Markdown
Contributor

Pull Request for JIRA Ticket: ----jasper-818----

Issue ticket number and link

JASPER-818

Description

Deduplicate documents from jc-interface civil file details request before adding them to judicial binder.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tested adding documents to judicial binder that are duplicated in jc-interface.

Checklist:

  • x] My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@devinleighsmith devinleighsmith self-assigned this May 7, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026


var otherDocs = detail.Document.Where(d => documentIds.Contains(d.CivilDocumentId));
// Deduplicate duplicate raw entries coming from file detail payload.
var otherDocs = detail.Document
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

inspired by:

const uniqueDocuments = computed<civilDocumentType[]>(() => {

(this is why "duplicate" documents do not display on the frontend, note that the jc-interface will return the same civilDocumentId/imageId in the document array for civil file details, just with different appearance information.

Copy link
Copy Markdown
Contributor

@ronaldo-macapobre ronaldo-macapobre May 11, 2026

Choose a reason for hiding this comment

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

@devinleighsmith it seems like @JTraill did some preliminary work (#1002) regarding the duplicate documents in the Judicial Binder. Based from the PRs' description, we are waiting for the long term decision on how to handle it. I guess, applying the same logic in the backend should work for now.

@devinleighsmith devinleighsmith merged commit 0ed828d into master May 12, 2026
8 checks passed
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.

3 participants