Statistical code deletion takes extremely long time (more than 1 minute) on bugfest environment

CSP Request Details

None

CSP Rejection Details

None

CSP Approved

None

Description

Preconditions:

At least one statistical code has been created in "Settings" -> "Inventory" -> "Statistical codes"

Authorized user with following permissions is logged in:

  • Settings (Inventory): Create, edit, delete statistical code types

  • Settings (Inventory): Create, edit, delete statistical codes

Steps to Reproduce:

  1. Go to "Settings" -> "Inventory" -> "Statistical codes"

  2. Click "Delete" icon (trash can) next to statistical code record from Preconditions

Expected Results:

Statistical code record was successfully deleted less than one second

Actual Results:

Statistical code record was successfully deleted more than one minute

Additional Information:

Environment

Potential Workaround

None

Attachments

2

Checklist

hide

Activity

Show:

NinaChistovaJanuary 15, 2025 at 3:50 PM

Issue is still actual on Eureka ecs bugfest

Khalilah GambrellAugust 8, 2024 at 2:31 PM

Will address as a front-end story.

Pavlo SmahinJuly 30, 2024 at 12:19 PM

I don’t know good way for UI to understand if such assignment exist.

Khalilah GambrellJuly 29, 2024 at 10:05 PM
Edited

Hey - could the front-end just prevent statistical codes from being deleted if assigned to to at least one instance, holdings, item record? Thus address this issue?

Pavlo SmahinMay 17, 2024 at 4:49 PM

The root cause of the issue is a trigger that checks if the statistical code is assigned to at least one instance, holdings, item record and raises an exception if yes. It’s needed to restrict deletion of the code in case it’s used.
The code of the trigger:

One possible solution here is to create intermediate tables for relations between the statistical code table and instance/holdings/item. If the logic relies on foreign keys instead of querying tables it will increase the performance of deletion but may a little affect performance of create/update/delete of instance/holdings/item.

Also, this solution will require a migration → populate already existing relations in newly created tables.

Won't Do

Details

Assignee

Reporter

Priority

Development Team

Spitfire

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created April 23, 2024 at 3:52 PM
Updated March 11, 2025 at 9:29 PM
Resolved March 11, 2025 at 9:29 PM
TestRail: Cases
TestRail: Runs