SPIKE: Duplicate calls for adding/removing tags

Description

https://bugfest.folio.ebsco.com.
Use `folio/folio user`
Please see video: https://foliotest.testrail.io/index.php?/tests/view/352

We are making duplicate calls for adding/removing tags. Question - should we make duplicate calls? And if not, then we should remove.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

3

Checklist

hide

TestRail: Results

Activity

Show:

Cate Boerema May 29, 2019 at 3:58 PM

Hi . Can you please give this bug a priority and tag it with "triaged"? Thanks much

Carole Godfrey May 24, 2019 at 1:37 PM

Determined at least 1 call to GET https://okapi-bugfest-eu-central-1.folio.ebsco.com/eholdings/packages/583-2356519/resources?page=1 is needed
This is the default behavior after a PUT package request is executed. When a package PUT request is made there is the potential for changing package Holding Status (Select/Not Selected). If holding status is changed - it is necessary to retrieve and redraw resource list to reflect the correct resource level holdings status (selected/not selected)

Carole Godfrey May 23, 2019 at 12:58 PM

After further investigation (of above requests) – believe that (2) + (3) should not be executing at all when adding/deleting a tag to/from a package (these are backend calls needed to populate list of package+titles on package details page). Compared network traffic for the same operation on Providers and Titles. In both cases only a PUT request is being made.
Found – In (componentDidUpdate) https://github.com/folio-org/ui-eholdings/blob/master/src/routes/package-show.js#L100 (getPackageTitles) is being called 2x in this case

Carole Godfrey May 22, 2019 at 4:12 PM

When adding/removing tags from a package – we see the following pattern in chrome (developer tools) - questioning why both request 2 + 3 are made – seems redundant and added overhead

(1)PUT https://okapi-bugfest-eu-central-1.folio.ebsco.com/eholdings/packages/583-2356519
(2)GET https://okapi-bugfest-eu-central-1.folio.ebsco.com/eholdings/packages/583-2356519/resources?page=1
(3)GET https://okapi-bugfest-eu-central-1.folio.ebsco.com/eholdings/packages/583-2356519/resources?page=1

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created May 21, 2019 at 2:18 PM
Updated October 3, 2019 at 3:36 PM
Resolved May 31, 2019 at 3:40 PM
TestRail: Cases
TestRail: Runs