If the field is an AV field, there should be an option to allow for multiple selection.
Created attachment 157324 [details] [review] Bug 35044: [DONT PUSH] dbic specific
Created attachment 157325 [details] [review] Bug 35044: DB changes + atomicupdate file Add the 'repeatable' column to additional_fields Remove the unique key from additional_field_values as we will now be allowing for repeated instances of the same field_id + record_id
Created attachment 157326 [details] [review] Bug 35044: Admin: New additional fields 'repeatable' field There is now a new 'repeatable' checkbox when configuring (adding or editing) an additional field for a specific table. It is also displayed in a column in the additional fields panel for a given tablename. MARC fields are not allowed to be repeatable.
Created attachment 157327 [details] [review] Bug 35044: Preparation: get_additional_field_values_for_template method New method to be utilized for retrieval of additional fields of any class that implements it. This is to be used when additional_fields are needed to be sent to .tt files for renderering. Both for form entries and read-only 'show' pages. Template files: Updated additional-fields-entry.inc: Now considers entry of repeatable fields. Repeatable text fields will have a "+New" link to allow for adding of a new instance of a repeatable field. Repeatable AV fields will be shown as checkboxes instead of a dropdown Update additional-fields-display.inc When displaying non-editable additional-fields, multiple instances for each field are now considered. Label now only shows if field has a non-null value in it. Option to show value_only Option to set if its to be displayed on a table cell Update histsearch.tt and filter-orders.inc Now calls additional-fields-entry.inc with search_form=1 to prevent repetable "+New" controls from showing on search inputs. additional-fields-entry.js New JS asset to be called by template files who require additional-fields-entry.inc for repeatable fields controls. This also handles the need for having the marcfield of type 'get' submitted if it is a disabled dropdown (AV marc field)
Created attachment 157328 [details] [review] Bug 35044: Update: Order baskets Test plan, k-t-d: Preparation: Create additional fields for table 'aqbasket': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new basket, visit: /cgi-bin/koha/acqui/basketheader.pl?booksellerid=1&op=add_form 2) Fill in name and all additional fields, click the '+New' and 'Clear' links, hit 'Save' 3) Notice the basket screen shows repeated fields separated by comma. 4) Notice that only non-null additional fields labels are shown. 5) Edit the basket. Notice all fields are shown as expected. Additional testing: Having a repeatable field with multiple instances, go back to the additional fields configuration and make the additional field non-repeatable again. Edit the basket again. Notice the multiple text instances are still shown, but the '+New' link no longer shows. You're able to remove existing multiple instances, but unable to add new ones, this is because the field is no longer repeatable.
Created attachment 157329 [details] [review] Bug 35044: Update: Acquisition orders Test plan, k-t-d: Preparation: Create additional fields for table 'aqorders': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new order for an existing basket, with an existing record, visit: /cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1&biblionumber=76 2) Set the mandatory "Koha item type" for the item. Click the 'Add item' button below. 3) Notice the accounting details now have quantity:1 4) Set the mandatory "Fund" input in accounting details. 5) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 6) In the orders table shown, click "Modify". Notice all the fields are presented correctly in the edit form.
Created attachment 157330 [details] [review] Bug 35044: Update: Invoices Added fixme comment to invoices.tt, the search works so nothing to do here, but the code is not DRY Test plan, k-t-d: Preparation: Create additional fields for table 'aqinvoices': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new invoice for an existing vendor, visit: /cgi-bin/koha/acqui/parcels.pl?booksellerid=1 2) Input something in the mandatory "Vendor invoice" field. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) Search for invoices, visit: http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 5) Click "Search" on the left column of the page 6) Click the invoice we just created. Verify all the fields show correctly. 7) Go back to the additional fields configuration, set all additional fields as "searchable" 8) Return to http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 9) Perform some searches using the additional fields values.
Created attachment 157331 [details] [review] Bug 35044: Update: Serial subscriptions Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Click Edit -> Edit Subscription, repeat steps 4 and 5 7) Go back to subscription additional fields, set all fields as searchable 8) Visit serials-home: /cgi-bin/koha/serials/serials-home.pl 9) Click 'Search' 10) Notice the searchable fields now show in their columns, repeated fields separated by comma 11) Perform a search using a repeatable field, verify it all works as expected. -- Subscription Claims -- Preparation: 1) Define a new claim notice, visit: /cgi-bin/koha/tools/letter.pl?op=add_form&module=claimissues 2) Input code, name, click "Email" set a "Message subject" and put something in the message body. Hit 'Save'. 3) Set a serial as late, visit our original subscription: /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1 4) Click "Edit serials" and status -> "Late". Hit "Save". 5) Link the original subscription to the existing vendor, visit: /cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=1 6) Click "Search for a vendor". Hit "Ok". Hit "Choose". Save the subscription. Claims: 7) Visit claims: /cgi-bin/koha/serials/claims.pl 8) Click "Ok" 9) Verify that searchable additional fields all have their respective column. Repeated fields are shown comma separated.
Created attachment 157332 [details] [review] Bug 35044: Update: Serial subscriptions batch edit Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Repeat steps 1-4 to create a second subscription 7) Visit serials home and hit "Search": /cgi-bin/koha/serials/serials-home.pl 8) Check the checkboxes next to the 2 subscriptions and click "Edit selected serials" 9) Input some values in the additional fields section, click the '+New' and 'Clear' links, hit 'Save' 10) Verify that both subscriptions now have the new values form the batch edit.
Created attachment 157333 [details] [review] Bug 35044: Update: Manual invoices, manual credits and accountlines Test plan, k-t-d: Preparation: Create additional fields for table 'accountlines:credit', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Acredit 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new manual credit for admin borrower: /cgi-bin/koha/members/mancredit.pl?borrowernumber=51 2) Set the mandatory "Amount" input (e.g. '5'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) On the table, click "Details" for the for account line we just created. 5) Notice the additional fields are there, repeated fields are comma separated. 6) Repeat the above test plan, but for accountlines:debit instead, visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Adebit 7) To add a manual invoice, visit: /cgi-bin/koha/members/maninvoice.pl?borrowernumber=51 --- Payments --- 8) Visit the transactions table, you should have at least 1 invoice from the above instructions: /cgi-bin/koha/members/boraccount.pl?borrowernumber=51 9) On the invoice table row, click "Pay" 10) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 11) Repeat step 1: go back to the transactions table 12) Click the 'details' of the payment row. Notice the fields are all there, repeated fields comma separated. 13) Create a new manual invoice again (step 7) 14) Visit "Make a payment", visit: /cgi-bin/koha/members/pay.pl?borrowernumber=51 15) Click "write off" 16) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 17) Go back to the transactions, visit: /cgi-bin/koha/members/boraccount.pl?borrowernumber=51 18) Click the 'details' of the writeoff row. Notice the additional fields are NOT there. This is a bug not caused by this development. See bug 35080
Created attachment 157334 [details] [review] Bug 35044: Add tests Test plan: prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t
Created attachment 158113 [details] [review] Bug 35044: Add repetable to REST API spec
Created attachment 158498 [details] [review] Bug 35044: [DONT PUSH] dbic specific
Created attachment 158499 [details] [review] Bug 35044: DB changes + atomicupdate file Add the 'repeatable' column to additional_fields Remove the unique key from additional_field_values as we will now be allowing for repeated instances of the same field_id + record_id
Created attachment 158500 [details] [review] Bug 35044: Admin: New additional fields 'repeatable' field There is now a new 'repeatable' checkbox when configuring (adding or editing) an additional field for a specific table. It is also displayed in a column in the additional fields panel for a given tablename. MARC fields are not allowed to be repeatable.
Created attachment 158501 [details] [review] Bug 35044: Preparation: get_additional_field_values_for_template method New method to be utilized for retrieval of additional fields of any class that implements it. This is to be used when additional_fields are needed to be sent to .tt files for renderering. Both for form entries and read-only 'show' pages. Template files: Updated additional-fields-entry.inc: Now considers entry of repeatable fields. Repeatable text fields will have a "+New" link to allow for adding of a new instance of a repeatable field. Repeatable AV fields will be shown as checkboxes instead of a dropdown Update additional-fields-display.inc When displaying non-editable additional-fields, multiple instances for each field are now considered. Label now only shows if field has a non-null value in it. Option to show value_only Option to set if its to be displayed on a table cell Update histsearch.tt and filter-orders.inc Now calls additional-fields-entry.inc with search_form=1 to prevent repetable "+New" controls from showing on search inputs. additional-fields-entry.js New JS asset to be called by template files who require additional-fields-entry.inc for repeatable fields controls. This also handles the need for having the marcfield of type 'get' submitted if it is a disabled dropdown (AV marc field)
Created attachment 158502 [details] [review] Bug 35044: Update: Order baskets Test plan, k-t-d: Preparation: Create additional fields for table 'aqbasket': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new basket, visit: /cgi-bin/koha/acqui/basketheader.pl?booksellerid=1&op=add_form 2) Fill in name and all additional fields, click the '+New' and 'Clear' links, hit 'Save' 3) Notice the basket screen shows repeated fields separated by comma. 4) Notice that only non-null additional fields labels are shown. 5) Edit the basket. Notice all fields are shown as expected. Additional testing: Having a repeatable field with multiple instances, go back to the additional fields configuration and make the additional field non-repeatable again. Edit the basket again. Notice the multiple text instances are still shown, but the '+New' link no longer shows. You're able to remove existing multiple instances, but unable to add new ones, this is because the field is no longer repeatable.
Created attachment 158503 [details] [review] Bug 35044: Update: Acquisition orders Test plan, k-t-d: Preparation: Create additional fields for table 'aqorders': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new order for an existing basket, with an existing record, visit: /cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1&biblionumber=76 2) Set the mandatory "Koha item type" for the item. Click the 'Add item' button below. 3) Notice the accounting details now have quantity:1 4) Set the mandatory "Fund" input in accounting details. 5) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 6) In the orders table shown, click "Modify". Notice all the fields are presented correctly in the edit form.
Created attachment 158504 [details] [review] Bug 35044: Update: Invoices Added fixme comment to invoices.tt, the search works so nothing to do here, but the code is not DRY Test plan, k-t-d: Preparation: Create additional fields for table 'aqinvoices': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new invoice for an existing vendor, visit: /cgi-bin/koha/acqui/parcels.pl?booksellerid=1 2) Input something in the mandatory "Vendor invoice" field. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) Search for invoices, visit: http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 5) Click "Search" on the left column of the page 6) Click the invoice we just created. Verify all the fields show correctly. 7) Go back to the additional fields configuration, set all additional fields as "searchable" 8) Return to http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 9) Perform some searches using the additional fields values.
Created attachment 158505 [details] [review] Bug 35044: Update: Serial subscriptions Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Click Edit -> Edit Subscription, repeat steps 4 and 5 7) Go back to subscription additional fields, set all fields as searchable 8) Visit serials-home: /cgi-bin/koha/serials/serials-home.pl 9) Click 'Search' 10) Notice the searchable fields now show in their columns, repeated fields separated by comma 11) Perform a search using a repeatable field, verify it all works as expected. -- Subscription Claims -- Preparation: 1) Define a new claim notice, visit: /cgi-bin/koha/tools/letter.pl?op=add_form&module=claimissues 2) Input code, name, click "Email" set a "Message subject" and put something in the message body. Hit 'Save'. 3) Set a serial as late, visit our original subscription: /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1 4) Click "Edit serials" and status -> "Late". Hit "Save". 5) Link the original subscription to the existing vendor, visit: /cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=1 6) Click "Search for a vendor". Hit "Ok". Hit "Choose". Save the subscription. Claims: 7) Visit claims: /cgi-bin/koha/serials/claims.pl 8) Click "Ok" 9) Verify that searchable additional fields all have their respective column. Repeated fields are shown comma separated.
Created attachment 158506 [details] [review] Bug 35044: Update: Serial subscriptions batch edit Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Repeat steps 1-4 to create a second subscription 7) Visit serials home and hit "Search": /cgi-bin/koha/serials/serials-home.pl 8) Check the checkboxes next to the 2 subscriptions and click "Edit selected serials" 9) Input some values in the additional fields section, click the '+New' and 'Clear' links, hit 'Save' 10) Verify that both subscriptions now have the new values form the batch edit.
Created attachment 158507 [details] [review] Bug 35044: Update: Manual invoices, manual credits and accountlines Test plan, k-t-d: Preparation: Create additional fields for table 'accountlines:credit', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Acredit 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new manual credit for admin borrower: /cgi-bin/koha/members/mancredit.pl?borrowernumber=51 2) Set the mandatory "Amount" input (e.g. '5'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) On the table, click "Details" for the for account line we just created. 5) Notice the additional fields are there, repeated fields are comma separated. 6) Repeat the above test plan, but for accountlines:debit instead, visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Adebit 7) To add a manual invoice, visit: /cgi-bin/koha/members/maninvoice.pl?borrowernumber=51
Created attachment 158508 [details] [review] Bug 35044: Add tests Test plan: prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t
Rebased on top of bug 35190
Created attachment 158857 [details] [review] Bug 35044: [DONT PUSH] dbic specific
Created attachment 158858 [details] [review] Bug 35044: DB changes + atomicupdate file Add the 'repeatable' column to additional_fields Remove the unique key from additional_field_values as we will now be allowing for repeated instances of the same field_id + record_id
Created attachment 158859 [details] [review] Bug 35044: Admin: New additional fields 'repeatable' field There is now a new 'repeatable' checkbox when configuring (adding or editing) an additional field for a specific table. It is also displayed in a column in the additional fields panel for a given tablename. MARC fields are not allowed to be repeatable.
Created attachment 158860 [details] [review] Bug 35044: Preparation: get_additional_field_values_for_template method New method to be utilized for retrieval of additional fields of any class that implements it. This is to be used when additional_fields are needed to be sent to .tt files for renderering. Both for form entries and read-only 'show' pages. Template files: Updated additional-fields-entry.inc: Now considers entry of repeatable fields. Repeatable text fields will have a "+New" link to allow for adding of a new instance of a repeatable field. Repeatable AV fields will be shown as checkboxes instead of a dropdown Update additional-fields-display.inc When displaying non-editable additional-fields, multiple instances for each field are now considered. Label now only shows if field has a non-null value in it. Option to show value_only Option to set if its to be displayed on a table cell Update histsearch.tt and filter-orders.inc Now calls additional-fields-entry.inc with search_form=1 to prevent repetable "+New" controls from showing on search inputs. additional-fields-entry.js New JS asset to be called by template files who require additional-fields-entry.inc for repeatable fields controls. This also handles the need for having the marcfield of type 'get' submitted if it is a disabled dropdown (AV marc field)
Created attachment 158861 [details] [review] Bug 35044: Update: Order baskets Test plan, k-t-d: Preparation: Create additional fields for table 'aqbasket': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new basket, visit: /cgi-bin/koha/acqui/basketheader.pl?booksellerid=1&op=add_form 2) Fill in name and all additional fields, click the '+New' and 'Clear' links, hit 'Save' 3) Notice the basket screen shows repeated fields separated by comma. 4) Notice that only non-null additional fields labels are shown. 5) Edit the basket. Notice all fields are shown as expected. Additional testing: Having a repeatable field with multiple instances, go back to the additional fields configuration and make the additional field non-repeatable again. Edit the basket again. Notice the multiple text instances are still shown, but the '+New' link no longer shows. You're able to remove existing multiple instances, but unable to add new ones, this is because the field is no longer repeatable.
Created attachment 158862 [details] [review] Bug 35044: Update: Acquisition orders Test plan, k-t-d: Preparation: Create additional fields for table 'aqorders': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new order for an existing basket, with an existing record, visit: /cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1&biblionumber=76 2) Set the mandatory "Koha item type" for the item. Click the 'Add item' button below. 3) Notice the accounting details now have quantity:1 4) Set the mandatory "Fund" input in accounting details. 5) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 6) In the orders table shown, click "Modify". Notice all the fields are presented correctly in the edit form.
Created attachment 158863 [details] [review] Bug 35044: Update: Invoices Added fixme comment to invoices.tt, the search works so nothing to do here, but the code is not DRY Test plan, k-t-d: Preparation: Create additional fields for table 'aqinvoices': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new invoice for an existing vendor, visit: /cgi-bin/koha/acqui/parcels.pl?booksellerid=1 2) Input something in the mandatory "Vendor invoice" field. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) Search for invoices, visit: http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 5) Click "Search" on the left column of the page 6) Click the invoice we just created. Verify all the fields show correctly. 7) Go back to the additional fields configuration, set all additional fields as "searchable" 8) Return to http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 9) Perform some searches using the additional fields values.
Created attachment 158864 [details] [review] Bug 35044: Update: Serial subscriptions Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Click Edit -> Edit Subscription, repeat steps 4 and 5 7) Go back to subscription additional fields, set all fields as searchable 8) Visit serials-home: /cgi-bin/koha/serials/serials-home.pl 9) Click 'Search' 10) Notice the searchable fields now show in their columns, repeated fields separated by comma 11) Perform a search using a repeatable field, verify it all works as expected. -- Subscription Claims -- Preparation: 1) Define a new claim notice, visit: /cgi-bin/koha/tools/letter.pl?op=add_form&module=claimissues 2) Input code, name, click "Email" set a "Message subject" and put something in the message body. Hit 'Save'. 3) Set a serial as late, visit our original subscription: /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1 4) Click "Edit serials" and status -> "Late". Hit "Save". 5) Link the original subscription to the existing vendor, visit: /cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=1 6) Click "Search for a vendor". Hit "Ok". Hit "Choose". Save the subscription. Claims: 7) Visit claims: /cgi-bin/koha/serials/claims.pl 8) Click "Ok" 9) Verify that searchable additional fields all have their respective column. Repeated fields are shown comma separated.
Created attachment 158865 [details] [review] Bug 35044: Update: Serial subscriptions batch edit Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Repeat steps 1-4 to create a second subscription 7) Visit serials home and hit "Search": /cgi-bin/koha/serials/serials-home.pl 8) Check the checkboxes next to the 2 subscriptions and click "Edit selected serials" 9) Input some values in the additional fields section, click the '+New' and 'Clear' links, hit 'Save' 10) Verify that both subscriptions now have the new values form the batch edit.
Created attachment 158866 [details] [review] Bug 35044: Update: Manual invoices, manual credits and accountlines Test plan, k-t-d: Preparation: Create additional fields for table 'accountlines:credit', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Acredit 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new manual credit for admin borrower: /cgi-bin/koha/members/mancredit.pl?borrowernumber=51 2) Set the mandatory "Amount" input (e.g. '5'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) On the table, click "Details" for the for account line we just created. 5) Notice the additional fields are there, repeated fields are comma separated. 6) Repeat the above test plan, but for accountlines:debit instead, visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Adebit 7) To add a manual invoice, visit: /cgi-bin/koha/members/maninvoice.pl?borrowernumber=51
Created attachment 158867 [details] [review] Bug 35044: Add repetable to REST API spec
Created attachment 158868 [details] [review] Bug 35044: Add tests Test plan: prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t
Rebased on bug 34708
Created attachment 159268 [details] [review] Bug 35044: (QA Follow-up) Fix atomicupdate Was missing bug number and correct filename Was checking for the wrong unique key name, existing unique key name is 'field_record', not 'afv_fk'
Created attachment 160177 [details] [review] Bug 35044: [DONT PUSH] dbic specific Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160178 [details] [review] Bug 35044: DB changes + atomicupdate file Add the 'repeatable' column to additional_fields Remove the unique key from additional_field_values as we will now be allowing for repeated instances of the same field_id + record_id Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160179 [details] [review] Bug 35044: Admin: New additional fields 'repeatable' field There is now a new 'repeatable' checkbox when configuring (adding or editing) an additional field for a specific table. It is also displayed in a column in the additional fields panel for a given tablename. MARC fields are not allowed to be repeatable. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160180 [details] [review] Bug 35044: Preparation: get_additional_field_values_for_template method New method to be utilized for retrieval of additional fields of any class that implements it. This is to be used when additional_fields are needed to be sent to .tt files for renderering. Both for form entries and read-only 'show' pages. Template files: Updated additional-fields-entry.inc: Now considers entry of repeatable fields. Repeatable text fields will have a "+New" link to allow for adding of a new instance of a repeatable field. Repeatable AV fields will be shown as checkboxes instead of a dropdown Update additional-fields-display.inc When displaying non-editable additional-fields, multiple instances for each field are now considered. Label now only shows if field has a non-null value in it. Option to show value_only Option to set if its to be displayed on a table cell Update histsearch.tt and filter-orders.inc Now calls additional-fields-entry.inc with search_form=1 to prevent repetable "+New" controls from showing on search inputs. additional-fields-entry.js New JS asset to be called by template files who require additional-fields-entry.inc for repeatable fields controls. This also handles the need for having the marcfield of type 'get' submitted if it is a disabled dropdown (AV marc field) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160181 [details] [review] Bug 35044: Update: Order baskets Test plan, k-t-d: Preparation: Create additional fields for table 'aqbasket': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new basket, visit: /cgi-bin/koha/acqui/basketheader.pl?booksellerid=1&op=add_form 2) Fill in name and all additional fields, click the '+New' and 'Clear' links, hit 'Save' 3) Notice the basket screen shows repeated fields separated by comma. 4) Notice that only non-null additional fields labels are shown. 5) Edit the basket. Notice all fields are shown as expected. Additional testing: Having a repeatable field with multiple instances, go back to the additional fields configuration and make the additional field non-repeatable again. Edit the basket again. Notice the multiple text instances are still shown, but the '+New' link no longer shows. You're able to remove existing multiple instances, but unable to add new ones, this is because the field is no longer repeatable. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160182 [details] [review] Bug 35044: Update: Acquisition orders Test plan, k-t-d: Preparation: Create additional fields for table 'aqorders': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new order for an existing basket, with an existing record, visit: /cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1&biblionumber=76 2) Set the mandatory "Koha item type" for the item. Click the 'Add item' button below. 3) Notice the accounting details now have quantity:1 4) Set the mandatory "Fund" input in accounting details. 5) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 6) In the orders table shown, click "Modify". Notice all the fields are presented correctly in the edit form. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160183 [details] [review] Bug 35044: Update: Invoices Added fixme comment to invoices.tt, the search works so nothing to do here, but the code is not DRY Test plan, k-t-d: Preparation: Create additional fields for table 'aqinvoices': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new invoice for an existing vendor, visit: /cgi-bin/koha/acqui/parcels.pl?booksellerid=1 2) Input something in the mandatory "Vendor invoice" field. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) Search for invoices, visit: http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 5) Click "Search" on the left column of the page 6) Click the invoice we just created. Verify all the fields show correctly. 7) Go back to the additional fields configuration, set all additional fields as "searchable" 8) Return to http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 9) Perform some searches using the additional fields values. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160184 [details] [review] Bug 35044: Update: Serial subscriptions Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Click Edit -> Edit Subscription, repeat steps 4 and 5 7) Go back to subscription additional fields, set all fields as searchable 8) Visit serials-home: /cgi-bin/koha/serials/serials-home.pl 9) Click 'Search' 10) Notice the searchable fields now show in their columns, repeated fields separated by comma 11) Perform a search using a repeatable field, verify it all works as expected. -- Subscription Claims -- Preparation: 1) Define a new claim notice, visit: /cgi-bin/koha/tools/letter.pl?op=add_form&module=claimissues 2) Input code, name, click "Email" set a "Message subject" and put something in the message body. Hit 'Save'. 3) Set a serial as late, visit our original subscription: /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1 4) Click "Edit serials" and status -> "Late". Hit "Save". 5) Link the original subscription to the existing vendor, visit: /cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=1 6) Click "Search for a vendor". Hit "Ok". Hit "Choose". Save the subscription. Claims: 7) Visit claims: /cgi-bin/koha/serials/claims.pl 8) Click "Ok" 9) Verify that searchable additional fields all have their respective column. Repeated fields are shown comma separated. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160185 [details] [review] Bug 35044: Update: Serial subscriptions batch edit Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Repeat steps 1-4 to create a second subscription 7) Visit serials home and hit "Search": /cgi-bin/koha/serials/serials-home.pl 8) Check the checkboxes next to the 2 subscriptions and click "Edit selected serials" 9) Input some values in the additional fields section, click the '+New' and 'Clear' links, hit 'Save' 10) Verify that both subscriptions now have the new values form the batch edit. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160186 [details] [review] Bug 35044: Update: Manual invoices, manual credits and accountlines Test plan, k-t-d: Preparation: Create additional fields for table 'accountlines:credit', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Acredit 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new manual credit for admin borrower: /cgi-bin/koha/members/mancredit.pl?borrowernumber=51 2) Set the mandatory "Amount" input (e.g. '5'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) On the table, click "Details" for the for account line we just created. 5) Notice the additional fields are there, repeated fields are comma separated. 6) Repeat the above test plan, but for accountlines:debit instead, visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Adebit 7) To add a manual invoice, visit: /cgi-bin/koha/members/maninvoice.pl?borrowernumber=51 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160187 [details] [review] Bug 35044: Add repetable to REST API spec Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160188 [details] [review] Bug 35044: Add tests Test plan: prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 160189 [details] [review] Bug 35044: (QA Follow-up) Fix atomicupdate Was missing bug number and correct filename Was checking for the wrong unique key name, existing unique key name is 'field_record', not 'afv_fk' Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Tested thoroughly and I'm really happy with the results here. There's one caveat, which I've already discussed with Pedro and we came to the conclusion it was a feature rather than a bug. The repeatable implementation is all UI level, there's no check on store to prevent a non-repeatable field being repeated.. this means if you're so inclined you could carefully craft a request to add an additional field value for a field marked non-repeatable. However, given that you can flick between repeatable/non-repeatable in the UI easily (and that doesn't cleanup existing repeated value's as we felt it least destructive to keep the data around) and you can remove existing repeated value's, but not add new ones to a newly marked non-repeatable field this covers the use cases nicely. Signing off.
Patches no longer apply 8-(.... git bz apply 35044 Bug 35044 Depends on bug 35197 (Signed Off) Follow? [(y)es, (n)o] y Bug 35197 - Expose additional_field definitions through REST API 159648 - Bug 35197: Add additional_fields REST API endpoint 159649 - Bug 35197: Add tests 159650 - Bug 35197: Field name consistency Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 35197: Add additional_fields REST API endpoint Applying: Bug 35197: Add tests Applying: Bug 35197: Field name consistency Bug 35044 - Additional fields: Allow for repeatable fields 160177 - Bug 35044: [DONT PUSH] dbic specific 160178 - Bug 35044: DB changes + atomicupdate file 160179 - Bug 35044: Admin: New additional fields 'repeatable' field 160180 - Bug 35044: Preparation: 160181 - Bug 35044: Update: Order baskets 160182 - Bug 35044: Update: Acquisition orders 160183 - Bug 35044: Update: Invoices 160184 - Bug 35044: Update: Serial subscriptions 160185 - Bug 35044: Update: Serial subscriptions batch edit 160186 - Bug 35044: Update: Manual invoices, manual credits and accountlines 160187 - Bug 35044: Add repetable to REST API spec 160188 - Bug 35044: Add tests 160189 - Bug 35044: (QA Follow-up) Fix atomicupdate Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 35044: [DONT PUSH] dbic specific Applying: Bug 35044: DB changes + atomicupdate file Applying: Bug 35044: Admin: New additional fields 'repeatable' field Applying: Bug 35044: Preparation: Applying: Bug 35044: Update: Order baskets Applying: Bug 35044: Update: Acquisition orders Using index info to reconstruct a base tree... M acqui/addorder.pl M acqui/neworderempty.pl M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt Auto-merging acqui/neworderempty.pl Auto-merging acqui/addorder.pl CONFLICT (content): Merge conflict in acqui/addorder.pl error: Failed to merge in the changes. Patch failed at 0001 Bug 35044: Update: Acquisition orders
Created attachment 164162 [details] [review] Bug 35044: [DONT PUSH] dbic specific Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164163 [details] [review] Bug 35044: DB changes + atomicupdate file Add the 'repeatable' column to additional_fields Remove the unique key from additional_field_values as we will now be allowing for repeated instances of the same field_id + record_id Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164164 [details] [review] Bug 35044: Admin: New additional fields 'repeatable' field There is now a new 'repeatable' checkbox when configuring (adding or editing) an additional field for a specific table. It is also displayed in a column in the additional fields panel for a given tablename. MARC fields are not allowed to be repeatable. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164165 [details] [review] Bug 35044: Preparation: get_additional_field_values_for_template method New method to be utilized for retrieval of additional fields of any class that implements it. This is to be used when additional_fields are needed to be sent to .tt files for renderering. Both for form entries and read-only 'show' pages. Template files: Updated additional-fields-entry.inc: Now considers entry of repeatable fields. Repeatable text fields will have a "+New" link to allow for adding of a new instance of a repeatable field. Repeatable AV fields will be shown as checkboxes instead of a dropdown Update additional-fields-display.inc When displaying non-editable additional-fields, multiple instances for each field are now considered. Label now only shows if field has a non-null value in it. Option to show value_only Option to set if its to be displayed on a table cell Update histsearch.tt and filter-orders.inc Now calls additional-fields-entry.inc with search_form=1 to prevent repetable "+New" controls from showing on search inputs. additional-fields-entry.js New JS asset to be called by template files who require additional-fields-entry.inc for repeatable fields controls. This also handles the need for having the marcfield of type 'get' submitted if it is a disabled dropdown (AV marc field) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164166 [details] [review] Bug 35044: Update: Order baskets Test plan, k-t-d: Preparation: Create additional fields for table 'aqbasket': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new basket, visit: /cgi-bin/koha/acqui/basketheader.pl?booksellerid=1&op=add_form 2) Fill in name and all additional fields, click the '+New' and 'Clear' links, hit 'Save' 3) Notice the basket screen shows repeated fields separated by comma. 4) Notice that only non-null additional fields labels are shown. 5) Edit the basket. Notice all fields are shown as expected. Additional testing: Having a repeatable field with multiple instances, go back to the additional fields configuration and make the additional field non-repeatable again. Edit the basket again. Notice the multiple text instances are still shown, but the '+New' link no longer shows. You're able to remove existing multiple instances, but unable to add new ones, this is because the field is no longer repeatable. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164167 [details] [review] Bug 35044: Update: Acquisition orders Test plan, k-t-d: Preparation: Create additional fields for table 'aqorders': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new order for an existing basket, with an existing record, visit: /cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1&biblionumber=76 2) Set the mandatory "Koha item type" for the item. Click the 'Add item' button below. 3) Notice the accounting details now have quantity:1 4) Set the mandatory "Fund" input in accounting details. 5) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 6) In the orders table shown, click "Modify". Notice all the fields are presented correctly in the edit form. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164168 [details] [review] Bug 35044: Update: Invoices Added fixme comment to invoices.tt, the search works so nothing to do here, but the code is not DRY Test plan, k-t-d: Preparation: Create additional fields for table 'aqinvoices': 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new invoice for an existing vendor, visit: /cgi-bin/koha/acqui/parcels.pl?booksellerid=1 2) Input something in the mandatory "Vendor invoice" field. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) Search for invoices, visit: http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 5) Click "Search" on the left column of the page 6) Click the invoice we just created. Verify all the fields show correctly. 7) Go back to the additional fields configuration, set all additional fields as "searchable" 8) Return to http://localhost:8081/cgi-bin/koha/acqui/invoices.pl 9) Perform some searches using the additional fields values. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164169 [details] [review] Bug 35044: Update: Serial subscriptions Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Click Edit -> Edit Subscription, repeat steps 4 and 5 7) Go back to subscription additional fields, set all fields as searchable 8) Visit serials-home: /cgi-bin/koha/serials/serials-home.pl 9) Click 'Search' 10) Notice the searchable fields now show in their columns, repeated fields separated by comma 11) Perform a search using a repeatable field, verify it all works as expected. -- Subscription Claims -- Preparation: 1) Define a new claim notice, visit: /cgi-bin/koha/tools/letter.pl?op=add_form&module=claimissues 2) Input code, name, click "Email" set a "Message subject" and put something in the message body. Hit 'Save'. 3) Set a serial as late, visit our original subscription: /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1 4) Click "Edit serials" and status -> "Late". Hit "Save". 5) Link the original subscription to the existing vendor, visit: /cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=1 6) Click "Search for a vendor". Hit "Ok". Hit "Choose". Save the subscription. Claims: 7) Visit claims: /cgi-bin/koha/serials/claims.pl 8) Click "Ok" 9) Verify that searchable additional fields all have their respective column. Repeated fields are shown comma separated. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164170 [details] [review] Bug 35044: Update: Serial subscriptions batch edit Test plan, k-t-d: Preparation: Create additional fields for table 'subscription', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=subscription 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c Attempt to create a repeatable MARC field (get or set). Notice you're unable to. 1) Add a new serial subscription, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all required fields and press "Test prediction pattern" 4) At the bottom, fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 5) Notice the fields are shown, repeated fields are comma separated 6) Repeat steps 1-4 to create a second subscription 7) Visit serials home and hit "Search": /cgi-bin/koha/serials/serials-home.pl 8) Check the checkboxes next to the 2 subscriptions and click "Edit selected serials" 9) Input some values in the additional fields section, click the '+New' and 'Clear' links, hit 'Save' 10) Verify that both subscriptions now have the new values form the batch edit. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164171 [details] [review] Bug 35044: Update: Manual invoices, manual credits and accountlines Test plan, k-t-d: Preparation: Create additional fields for table 'accountlines:credit', visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Acredit 2 text fields, one repeatable, one not-repeatable 2 AV fields, one repeatable, one not-repeatable 1) Add a new manual credit for admin borrower: /cgi-bin/koha/members/mancredit.pl?borrowernumber=51 2) Set the mandatory "Amount" input (e.g. '5'). Click the 'Next' and press 'Ok' on the alert box. 3) Fill in all additional fields, click the '+New' and 'Clear' links, hit 'Save' 4) On the table, click "Details" for the for account line we just created. 5) Notice the additional fields are there, repeated fields are comma separated. 6) Repeat the above test plan, but for accountlines:debit instead, visit: /cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Adebit 7) To add a manual invoice, visit: /cgi-bin/koha/members/maninvoice.pl?borrowernumber=51 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164172 [details] [review] Bug 35044: Add repetable to REST API spec Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164173 [details] [review] Bug 35044: Add tests Test plan: prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164174 [details] [review] Bug 35044: (QA Follow-up) Fix atomicupdate Was missing bug number and correct filename Was checking for the wrong unique key name, existing unique key name is 'field_record', not 'afv_fk' Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>