NCIOCPL / clinical-trials-search-app

Clinical Trial Search Front-end
1 stars 6 forks source link

On Trial Results Page, selecting one trial to print, returning from print page, then selecting all to print displays first trial twice on print Page #571

Closed sarinapadilla closed 2 years ago

sarinapadilla commented 2 years ago

Issue description

When select one trial by clicking the checkbox on the Search Results page and then click the "Print Selected" button, then the Print page loads and then if we use the browser "Go Back" option we return to the Search Results page with balls in the modal spinning and the previously selected trial checked. Now if we close the modal, we will see that the checkbox of the previously selected trial is still checked. Now if we click on the "Select all on page" checkbox and click "Print Selected" button, print page will load but we will see the trial that we first selected before selecting all trials is appearing twice on the print page.

This is definitely an edge case, but documenting here in case it's something we can investigate eventually.

ESTIMATE TBD

Steps to reproduce the issue

  1. Go to https://ncigovcdode450.prod.acquia-sites.com/about-cancer/treatment/clinical-trials/search/r?lcnty=United%20States&loc=2&lst=AL&rl=2
  2. Select a trial
  3. Click Print Selected
  4. Click the browser's back button
  5. Click Select all on page
  6. Click Print Selected

What's the expected result?

What's the actual result?

Additional details / screenshot

Related Tickets

sarinapadilla commented 2 years ago

Not a priority for v2 launch, but still needs to be investigated!

blairlearn commented 2 years ago

I'm not able to duplicate this. Looking at the print page, I only see 10 trials with no repeats. Likewise, looking at the request body, I see no duplication of trial IDs.

I do however see some very similar titles. Is it possible the "duplicate" is a misreading?

sarinapadilla commented 2 years ago

@blairlearn I followed the exact steps I outlined in the ticket, and was able to reproduce the issue. Here's the print page that generated: https://www-blue-dev.cancer.gov/CTS.Print/Display?printid=6211784e-860f-ed11-a1ee-005056b388d3

Here's the trial I clicked initially, listed first:

Screen Shot 2022-07-29 at 5 42 48 PM

Then that trial listed again:

Screen Shot 2022-07-29 at 5 43 00 PM

And then the print page showing 11 trials instead of 10:

Screen Shot 2022-07-29 at 5 44 04 PM

I also checked the request that's being sent to the print page, and here's the list of trial IDs given. See the first one is listed twice. { "trial_ids": [ "NCI-2014-01507", "NCI-2014-01507", "NCI-2015-00054", "NCI-2019-07439", "NCI-2016-01041", "NCI-2019-01068", "NCI-2020-03770", "NCI-2020-01541", "NCI-2017-01672", "NCI-2018-02217", "NCI-2014-02674" ], ... }

This only happens if you select one trial, click print, click the back button, close out of the modal, click "Select all on page", and then click print again. Very edge case-y, but still happening for me.

sarinapadilla commented 2 years ago

Now Blair is right and I'm not able to reproduce on Prod. Closing this ticket. (Hopefully we won't have to reopen)