Bug 27294 - Error when deleting claim
Summary: Error when deleting claim
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 27296
  Show dependency treegraph
 
Reported: 2020-12-22 14:44 UTC by Owen Leonard
Modified: 2022-06-06 20:25 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 27294: Error when deleting claim (1.77 KB, patch)
2020-12-22 15:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27294: Error when deleting claim (1.77 KB, patch)
2020-12-22 15:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27294: Error when deleting claim (1.84 KB, patch)
2021-01-19 12:53 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-12-22 14:44:30 UTC
To reproduce:

- View a patron who has resolved claims, either the checkout page or the patron detail page.
- From the claim's "Action" menu, choose "Delete"
- In the browser console you will see an error:

Uncaught ReferenceError: issuesTable is not defined

The claim is deleted, but the action is supposed to trigger a refresh of the checkouts table. Because "issueTable" is defined within a different function it can't be referenced here.
Comment 1 Owen Leonard 2020-12-22 15:00:10 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2020-12-22 15:04:15 UTC Comment hidden (obsolete)
Comment 3 PTFS Europe Sandboxes 2021-01-19 12:53:15 UTC Comment hidden (obsolete)
Comment 4 Sally 2021-01-19 12:53:47 UTC
Works as described.
Comment 5 Katrin Fischer 2021-01-28 22:25:55 UTC
Hi Owen, I have trouble replicating the bug without the patch. What I do:
- Check out item
- Claim returned
- Resolve
- Delete
- The issue disappears from the claims list.

Watching the console the whole time, there were no errors or warns related to these actions. Can you please double check on current master?
Comment 6 Owen Leonard 2021-01-29 11:59:48 UTC
(In reply to Katrin Fischer from comment #5)

> - Claim returned
> - Resolve

I think after this step you have to navigate away from the page or refresh the page for the error to occur.
Comment 7 Katrin Fischer 2021-01-31 14:36:43 UTC
I am sorry, still failing to see the error :( 
I will leave at signed off - I think another set of eyes is what is needed here.
Comment 8 Martin Renvoize 2021-02-02 10:47:07 UTC
I feel like this should be treated similarly to the claims table with load and refresh functions and a global scoped variable.

Whilst the fix here, I think resolves this issue, I think there are other issues in the same script that appear to have the same underlying code issue.