[Koha-bugs] [Bug 23352] Set serial issue default values when creating a subscription in serials/subscription-add.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Aug 13 03:04:03 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23352

--- Comment #13 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 92165
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92165&action=edit
Bug 23352: Default setting of item price, replacement price, ccode,
dateaccesioned in serials-edit.pl

This patch contains:
* Database and DBIx changes

* Setting 952g (items.price) and 952v (items.replacementprice) from
Acquisitions module order unitprice and replacment cost respectively

* Default setting of the 952d (items.dateaccessioned) on page load

* New input in serials/subscription-add.pl for librarian to select
default collection code for serial issues.

* 2 new sysprefs:

- DefaultToCreatingSerialIssuesOnReceival - Disabled by
default. When enabled it sets the 'Create an item record when
receiving this serial' to be ticked.

- PopulateNewItemDateAccessionedOnPageLoad - Disabled by default. When
enabled it populates the 952$d Date Acquired field in the item addition
page without the cataloguer having to click in the field.

Test plan:

1. Enter mysql terminal:
sudo koha-mysql <instancename>

2. Run the query: describe subscription;

3. Notice there is no 'ccode' column after the 'mana_id' column

4. In the staff client go to Serials > New subscription

5. Notice the 'Do not create an item record when receiving this serial'
radiobutton is ticked by default.

Click the 'Create an item record when receiving this serial' radiobutton

6. Fill out all the required serial fields, set the library branch to a
branch different to the library branch you are currently logged in as and click
'Save subscription'

7. Now go to the Acquisitions module.

Add a new basket to a vendor

Add to the basket and select 'From a subscription'

Search for the subscription you created in steps 5-6

Set a quantity, vendor price of 2 and replacement cost of 3

Save the order

8. Go back to Serials and recieve an item for the subscription and
notice that the item creation form that is loaded when you change the
status from 'Expected' to 'Arrived' does not set defaults for:

952$8 - Collection code
952$d - Date accessioned - You must click in the input box to load a
default value for this

952$g - Cost
952$v - Replacement price

Also note the 952$a and 952$b are set the library you set in the
subscription and not the branch you are currently logged in as

9. Exit mysql terminal and apply patch

10. Navigate to the installer/data/mysql
directory

11. Enter koha-shell: sudo koha-shell <instancename>

12. Run:
./updatedatabase.pl

13. Notice 2 atomicupdates run without errors

14. Exit koha-shell and re-enter mysql terminal and confirm the 'ccode'
column is in the subscription table now after mana_id column

Exit the MySQL terminal.

15. In the Koha staff client > Administration > Global System Preferences
and notice there is a new syspref in the 'Serials' system preferences
named 'DefaultToCreatingSerialIssuesOnReceival' and there is a new
syspref in the 'Cataloging' system preferences named -
PopulateNewItemDateAccessionedOnPageLoad

Notice both are disabled by default.

16. Repeat steps 4-8.

Notice there is now a new input in the subscription-add.pl page 2:
'Serial issue Collection' which populates with the contents of the ccode
authorised value

Notice upon receiving the item the
following fields do have a default value now:

952$8 - Collection code
952$g - Cost
952$v - Replacement price

17. Go back to Administration > Global System Preferences and set the
'DefaultToCreatingSerialIssuesOnReceival' and
'PopulateNewItemDateAccessionedOnPageLoad' syspref to 'Enabled'

18. Go back to Serials > New subscription and observe the 'Create an
item record when receiving this serial' radiobutton is now checked by
default

19. After creating the subscription repeat step 7 and now receive the
serial and notice that the 952d Date Acquired is set automatically to
todays date in the format: YYYY-MM-DD (i.e.
you don't have to click in the field).

20. Try clicking in the 952d and notice no second date is appended

21. Sign off :)

Sponsored-By: Brimbank Library, Australia

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list