Bug 26377 - Clearly label parts of subscription-add.pl that relate to optional item records
Summary: Clearly label parts of subscription-add.pl that relate to optional item records
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 23352
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-03 19:20 UTC by Andrew Fuerste-Henry
Modified: 2023-06-08 22:26 UTC (History)
5 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:
22.11.00, 22.05.05
Circulation function:


Attachments
Perhaps we hide fields based on which option is selected? (175.19 KB, image/gif)
2022-05-13 12:10 UTC, Owen Leonard
Details
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records (3.73 KB, patch)
2022-05-25 16:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records (3.78 KB, patch)
2022-05-31 02:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 26377: Show when loading the page if needed (2.72 KB, patch)
2022-05-31 09:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26377: Simplify JS code (1.35 KB, patch)
2022-05-31 09:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26377: Show when loading the page if needed (2.76 KB, patch)
2022-05-31 12:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26377: Simplify JS code (1.39 KB, patch)
2022-05-31 12:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records (3.86 KB, patch)
2022-05-31 13:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26377: Show when loading the page if needed (2.84 KB, patch)
2022-05-31 13:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26377: Simplify JS code (1.47 KB, patch)
2022-05-31 13:16 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 Andrew Fuerste-Henry 2020-09-03 19:20:07 UTC
On the first screen of subscription-add.pl, there are several fields that set values to be applied to created items. They're only needed if you are creating item records when receiving serials. It'd be very helpful to move these so that they are all grouped together and clearly labeled. It might even be reasonable to hide them if not set to create item records.
These fields relate to the item record:
- Call number
- Library
- Location
- item type
- item type for older issues
Comment 1 Katrin Fischer 2020-09-03 20:46:33 UTC
It's not completely true, some of this information, like the library and location are also shown in the OPAC if you choose not to create items. The library is also used for access control to subscriptions.
Comment 2 Andrew Fuerste-Henry 2020-09-04 13:26:20 UTC
Good correction, thanks!
Comment 3 Katrin Fischer 2020-09-04 13:59:31 UTC
I think Call number is shown as well - that would only leave us with the item types. Not sure what a good GUI improvement could look like here.
Comment 4 Owen Leonard 2022-05-12 16:09:51 UTC
Now that the form has collection and itemtype, perhaps we could enable or disable the fields based on whether the "Create an item record when receiving this serial" button is checked?
Comment 5 Owen Leonard 2022-05-13 12:10:30 UTC
Created attachment 134968 [details]
Perhaps we hide fields based on which option is selected?
Comment 6 Owen Leonard 2022-05-25 16:19:52 UTC
Created attachment 135355 [details] [review]
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records

This patch modifies the form for adding a new subscription so that the
collection and item type fields are shown only when the subscription is
configured to create an item when receiving.

To test, apply the patch and go to Serials -> New subscription.

- When the page first loads, the "Do not create an item record when
  receiving this serial" radio button should be selected.
- Under the "Location" field there should be no item type or collection
  field.
- Select the "Create an item when receiving this serial" radio button.
- The item type and collection fields should appear.
- Test that the values are correctly saved when you add or edit a
  subscription.
- If you edit a subscription which had item type and collection defined,
  and you switch to "Do not create an item..." the record should save with
  empty values for those fields.
- Confirm that existing subscriptions open with the correct settings
  applied: Only records with "Create an item..." checked should open
  with the item type and collection fields displayed.
Comment 7 Katrin Fischer 2022-05-26 16:18:57 UTC
I believe collection might also be shown somewhere outside of items, but I do not remember clearly from testing the patch. Just something to test here to make sure!
Comment 8 Katrin Fischer 2022-05-26 16:21:19 UTC
I verified, the patches had no changes to the OPAC template files, sorry for doubting you!
Comment 9 David Nind 2022-05-31 02:00:13 UTC
Created attachment 135455 [details] [review]
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records

This patch modifies the form for adding a new subscription so that the
collection and item type fields are shown only when the subscription is
configured to create an item when receiving.

To test, apply the patch and go to Serials -> New subscription.

- When the page first loads, the "Do not create an item record when
  receiving this serial" radio button should be selected.
- Under the "Location" field there should be no item type or collection
  field.
- Select the "Create an item when receiving this serial" radio button.
- The item type and collection fields should appear.
- Test that the values are correctly saved when you add or edit a
  subscription.
- If you edit a subscription which had item type and collection defined,
  and you switch to "Do not create an item..." the record should save with
  empty values for those fields.
- Confirm that existing subscriptions open with the correct settings
  applied: Only records with "Create an item..." checked should open
  with the item type and collection fields displayed.

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 Jonathan Druart 2022-05-31 09:18:41 UTC
Created attachment 135479 [details] [review]
Bug 26377: Show when loading the page if needed

Prevent a blink
Comment 11 Jonathan Druart 2022-05-31 09:18:45 UTC
Created attachment 135480 [details] [review]
Bug 26377: Simplify JS code
Comment 12 Jonathan Druart 2022-05-31 09:19:08 UTC
Owen, do you agree with those 2 patches?
Comment 13 Owen Leonard 2022-05-31 12:48:43 UTC
Created attachment 135491 [details] [review]
Bug 26377: Show when loading the page if needed

Prevent a blink

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 14 Owen Leonard 2022-05-31 12:48:47 UTC
Created attachment 135492 [details] [review]
Bug 26377: Simplify JS code

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 15 Jonathan Druart 2022-05-31 13:16:29 UTC
Created attachment 135500 [details] [review]
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records

This patch modifies the form for adding a new subscription so that the
collection and item type fields are shown only when the subscription is
configured to create an item when receiving.

To test, apply the patch and go to Serials -> New subscription.

- When the page first loads, the "Do not create an item record when
  receiving this serial" radio button should be selected.
- Under the "Location" field there should be no item type or collection
  field.
- Select the "Create an item when receiving this serial" radio button.
- The item type and collection fields should appear.
- Test that the values are correctly saved when you add or edit a
  subscription.
- If you edit a subscription which had item type and collection defined,
  and you switch to "Do not create an item..." the record should save with
  empty values for those fields.
- Confirm that existing subscriptions open with the correct settings
  applied: Only records with "Create an item..." checked should open
  with the item type and collection fields displayed.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Jonathan Druart 2022-05-31 13:16:34 UTC
Created attachment 135501 [details] [review]
Bug 26377: Show when loading the page if needed

Prevent a blink

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 17 Jonathan Druart 2022-05-31 13:16:38 UTC
Created attachment 135502 [details] [review]
Bug 26377: Simplify JS code

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 18 Tomás Cohen Arazi (tcohen) 2022-07-20 12:59:46 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 19 Lucas Gass (lukeg) 2022-08-23 19:55:15 UTC
Backported to 22.05.x for 22.05.05
Comment 20 Arthur Suzuki 2022-08-26 13:19:19 UTC
not feeling very confident while trying to fix the conflicts after applying on 21.11.
Please provide backport if needed.
Best,