Bug 32817 - Clean up cataloguing/value_builder/dateaccessioned.pl
Summary: Clean up cataloguing/value_builder/dateaccessioned.pl
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Julian Maurice
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 30975
  Show dependency treegraph
 
Reported: 2023-02-03 11:22 UTC by Julian Maurice
Modified: 2023-12-28 20:44 UTC (History)
3 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:
23.05.00,22.11.06
Circulation function:


Attachments
Bug 32817: Fix cataloguing/value_builder/dateaccessioned.pl (921 bytes, patch)
2023-02-03 11:23 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 32817: Stop links from jumping to top of page (2.67 KB, patch)
2023-02-04 00:21 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 32817: Fix cataloguing/value_builder/dateaccessioned.pl (970 bytes, patch)
2023-03-28 19:21 UTC, David Nind
Details | Diff | Splinter Review
Bug 32817: Fix cataloguing/value_builder/dateaccessioned.pl (1.00 KB, patch)
2023-04-22 21:23 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2023-02-03 11:22:49 UTC
This is part of the refactoring happening in bug 30975
Comment 1 Julian Maurice 2023-02-03 11:23:19 UTC
Created attachment 146075 [details] [review]
Bug 32817: Fix cataloguing/value_builder/dateaccessioned.pl

Remove unnecessary call to event.preventDefault()

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before
Comment 2 Lucas Gass (lukeg) 2023-02-04 00:11:24 UTC
When I add the plugin to a 952 field like 'Date acquired' and then go to an item record, when I like on the '...' the page jumps back to the top. This doesn't happen without the patch.

This appears to happen for me in both Chrome and Firefox.
Comment 3 Lucas Gass (lukeg) 2023-02-04 00:20:18 UTC
We can stop the links for jumping by using "#/" instead of "#" as the href.
Comment 4 Lucas Gass (lukeg) 2023-02-04 00:21:41 UTC
Created attachment 146175 [details] [review]
Bug 32817: Stop links from jumping to top of page
Comment 5 Julian Maurice 2023-02-06 07:02:05 UTC
Ah, sorry...
The call to preventDefault should be removed after bug 30975 is pushed. I'll fix the dependency order
Comment 6 Lucas Gass (lukeg) 2023-02-06 15:30:23 UTC
(In reply to Julian Maurice from comment #5)
> Ah, sorry...
> The call to preventDefault should be removed after bug 30975 is pushed. I'll
> fix the dependency order

Ah I see, thanks! It looks like the dependency order for most the bugs linked to Bug 30975 need changed as well, right?
Comment 7 Julian Maurice 2023-02-06 15:40:49 UTC
(In reply to Lucas Gass from comment #6)
> Ah I see, thanks! It looks like the dependency order for most the bugs
> linked to Bug 30975 need changed as well, right?
No, most of them are really required for bug 30975.
This one was only an unnecessary cleanup (bug 30975 adds the call to event.preventDefault outside of the plugin code).
There might be others, i will check them all.
Comment 8 David Nind 2023-03-28 19:21:25 UTC
Created attachment 148846 [details] [review]
Bug 32817: Fix cataloguing/value_builder/dateaccessioned.pl

Remove unnecessary call to event.preventDefault()

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2023-03-28 19:45:19 UTC
How I tested
~~~~~~~~~~~~

1. Applied bug 30975 (interactive, commented out the first patch) - this takes a while as you have to say yes to all the dependent bugs.
2. The plugin dateaccessioned.pl is already added in KTD to:
   2.1 subfield 995$5 for the default UNIMARC bibliographic framework (need to edit to make visible in the editor)
   2.1 subfield 952$d for the BKS MARC21 bibliographic framework (already visible in the editor)
3. Edit a bibliographic record.
4. Select the tag editor for the subfield.
5. Options and values should be the same before and after the patch is applied.

Description
~~~~~~~~~~~

This is a standard cataloguing plugin. It displays the flatpickr date widget to let you select the date an item was acquired (995$5 in UNIMARC and 952$d in MARC21).
Comment 10 Katrin Fischer 2023-04-22 21:23:10 UTC
Created attachment 150096 [details] [review]
Bug 32817: Fix cataloguing/value_builder/dateaccessioned.pl

Remove unnecessary call to event.preventDefault()

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Tomás Cohen Arazi (tcohen) 2023-04-24 13:49:10 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 12 Jacob O'Mara 2023-05-10 12:53:51 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.