bcgov / bcgov/foi-flow

Duplicate search results in redaction panel.

Open
#4,670 6 comments 0 reactions 1 assignee Claimed by @Aman-Hundal View on GitHub
bug low priority Vendor
Dominant language
Python
Stars
8
Forks
2
Avg merge
14h 34m
Merged PRs (30d)
46

Description

**Describe the bug in current situation**
There are duplicate results for searches being produced when using the Redaction Panel and searching a keyword in the docreivewer app. If you use the regular search you get the correct amount of results (notice the discrepancy in results found from redaction panel and regular search panel). These duplicate results in the redaction panel when clicked move the selection of the original results AND IF user selects both duplicates and add mark is selected and a redaction made, the redaction/annotation is created TWICE, but nothing breaks. The two redactions are made on top of each other. Two redactions being created is not what is expected and this is a problem. No errors are logged either.

**Link bug to the User Story**
https://test-reviewer-web-marshal.apps.silver.devops.gov.bc.ca/foi/606

**Impact of this bug**
Low to Medium as it does not break the app but causes some issues to core features (ie. redaction). Additionally, it only happens on some files.

**Chance of Occurring (high/medium/low/very low)**
Low to Medium. As it only happens on some files.

**Pre Conditions: which Env, any pre-requesites or assumptions to execute steps?**
Tested on regular dev and test-marshal.

**Steps to Reproduce**
Steps to reproduce the behavior:
1. Go to a document request in the docreviewer (use the one linked above)
2. Click on the redaction panel
3. Search for a keyword
4. Notice that there are duplicates being retrieved in the results (ie. using the request example linked above, search "sample" and notice that results 3 and 6 are duplicates and 4 and 7 are duplicates)
5. Select both duplicates and apply add mark
6. Notice there are two redactions created over the searched keyword.

**Actual/ observed behaviour/ results**
Duplicate instances of a search is retrieved and shown in the redaction panel search results AND when both duplicates are selected and add mark/redaction is applied, there are two redactions being created.

**Expected behaviour**
One instance of a search result should be shown and retrieved in the redaction panel search results and only one redaction should be created on add mark.

**Screenshots/ Visual Reference/ Source**
Search Result Image
[Private Zenhub Image](https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBd1NHQVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--cc7e11d8fbb8090f8ac39309cec64673682c1dee/image.png)

Redaction Panel Result Image with duplicates
[Private Zenhub Image](https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBd2VHQVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--983afe36a3f9923bc267f265173bb27b64518cb3/image.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.