Bug 27294

Summary: Error when deleting claim
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: martin.renvoize, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 27296    
Attachments: Bug 27294: Error when deleting claim
Bug 27294: Error when deleting claim
Bug 27294: Error when deleting claim

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.