Bug 25301 - Category code is blank when renewing or editing expired/expiring patron
Summary: Category code is blank when renewing or editing expired/expiring patron
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Peter Vashchuk
QA Contact: Testopia
URL:
Keywords: Academy
Depends on: 22134
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-28 02:00 UTC by David Cook
Modified: 2020-05-13 16:16 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06


Attachments
Bug 25301: removed useless URI parameter "categorycode" from template (5.38 KB, patch)
2020-05-06 13:18 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 25301: removed URI parameter "categorycode" from "circulation.tt" (3.41 KB, patch)
2020-05-07 09:24 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 25301: removed useless URI parameter "categorycode" from template (5.44 KB, patch)
2020-05-09 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25301: removed URI parameter "categorycode" from "circulation.tt" (3.47 KB, patch)
2020-05-09 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25301: removed useless URI parameter "categorycode" from template (5.51 KB, patch)
2020-05-11 09:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25301: removed URI parameter "categorycode" from "circulation.tt" (3.54 KB, patch)
2020-05-11 09:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25301: removed URI parameter "categorycode" from the toolbar (2.38 KB, patch)
2020-05-11 09:11 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2020-04-28 02:00:01 UTC
When renewing or editing the details of an expired patron via the "Renew" or "Edit details" links, there is a blank argument to "categorycode=".

At a glance, it doesn't seem to cause problems, so we should either fix the argument, or remove the parameter.
Comment 1 Peter Vashchuk 2020-05-05 14:54:21 UTC
I can change template to prevent empty 'categorycode=' from being added:
[% IF categorycode %]&categorycode=[% categorycode | html %][% END %]

After checking repository history and template stash I wasn't able to find any traces of 'categorycode' template parameter defined at all, in both /members/moremember.pl and /circ/circulations.pl, if that so, then we should remove `&categorycode=[% categorycode | html %]` from templates.

If you can double check me and confirm that 'categorycode' not populated as template parameter in these perl files, then I propose for it's removal. I can commit the patch.
Comment 2 Jonathan Druart 2020-05-06 09:05:01 UTC
I confirm, that does not make sense.

Coming from
  commit e193254e357e52f87e10f9b03e350781d2613062
  Bug 22134: Add account expiration information to patron details
Comment 3 Peter Vashchuk 2020-05-06 13:18:44 UTC
Created attachment 104418 [details] [review]
Bug 25301: removed useless URI parameter "categorycode" from template

Both "Edit details" links were sending empty query parameter
"categorycode" as there is no such template parameter in "moremember.pl"
defined at all, because template code block looks copy-pasted
from "circulation.tt".

This patch removes the parameter from "moremember.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron details page of that patron.
    3) Inspect both "Edit details" links:
       one in the notification about expiration
       and other one in the "Expiration date:" field.
    4) Observe empty parameter "categorycode=" in those links.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the links anymore.
Comment 4 Peter Vashchuk 2020-05-06 14:19:36 UTC
Also I inspected "circulation.tt" template as well,
as it has the same problem that "moremember.tt" had, link "Edit details"
attempts to send parameter "categorycode" that is empty as it is not defined
in "circulation.pl" same way it was not defined in "moremember.pl"
I could not find any traces of how it appeared there before.

Do you think it will be reasonable to remove it from "circulation.tt" as well
as a separate patch or a new ticket?
Comment 5 Jonathan Druart 2020-05-06 14:34:28 UTC
Separate patch please :)
Comment 6 Peter Vashchuk 2020-05-07 09:24:12 UTC
Created attachment 104484 [details] [review]
Bug 25301: removed URI parameter "categorycode" from "circulation.tt"

"Edit details" links in patron's circulation check-out page
was sending empty query parameter "categorycode" because there is no
defined template parameter in "circulation.pl"

This patch removes the URI parameter from "circulation.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron's circulation check-out page.
    3) Inspect "Edit details" link.
    4) Observe empty parameter "categorycode=" in that link.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the link anymore.
Comment 7 Katrin Fischer 2020-05-09 22:38:37 UTC
Created attachment 104630 [details] [review]
Bug 25301: removed useless URI parameter "categorycode" from template

Both "Edit details" links were sending empty query parameter
"categorycode" as there is no such template parameter in "moremember.pl"
defined at all, because template code block looks copy-pasted
from "circulation.tt".

This patch removes the parameter from "moremember.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron details page of that patron.
    3) Inspect both "Edit details" links:
       one in the notification about expiration
       and other one in the "Expiration date:" field.
    4) Observe empty parameter "categorycode=" in those links.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the links anymore.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2020-05-09 22:38:41 UTC
Created attachment 104631 [details] [review]
Bug 25301: removed URI parameter "categorycode" from "circulation.tt"

"Edit details" links in patron's circulation check-out page
was sending empty query parameter "categorycode" because there is no
defined template parameter in "circulation.pl"

This patch removes the URI parameter from "circulation.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron's circulation check-out page.
    3) Inspect "Edit details" link.
    4) Observe empty parameter "categorycode=" in that link.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the link anymore.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Jonathan Druart 2020-05-11 09:11:03 UTC
Created attachment 104656 [details] [review]
Bug 25301: removed useless URI parameter "categorycode" from template

Both "Edit details" links were sending empty query parameter
"categorycode" as there is no such template parameter in "moremember.pl"
defined at all, because template code block looks copy-pasted
from "circulation.tt".

This patch removes the parameter from "moremember.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron details page of that patron.
    3) Inspect both "Edit details" links:
       one in the notification about expiration
       and other one in the "Expiration date:" field.
    4) Observe empty parameter "categorycode=" in those links.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the links anymore.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2020-05-11 09:11:08 UTC
Created attachment 104657 [details] [review]
Bug 25301: removed URI parameter "categorycode" from "circulation.tt"

"Edit details" links in patron's circulation check-out page
was sending empty query parameter "categorycode" because there is no
defined template parameter in "circulation.pl"

This patch removes the URI parameter from "circulation.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron's circulation check-out page.
    3) Inspect "Edit details" link.
    4) Observe empty parameter "categorycode=" in that link.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the link anymore.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2020-05-11 09:11:13 UTC
Created attachment 104658 [details] [review]
Bug 25301: removed URI parameter "categorycode" from the toolbar

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Martin Renvoize 2020-05-12 10:25:39 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 13 Joy Nelson 2020-05-13 16:16:38 UTC
Pushed to 19.11.x for 19.11.06