Description
Hannah Dunne-Howrie
2024-11-15 14:24:39 UTC
We're going to take this on within PTFS Europe, it's on my list to assign it out to the team today and schedule it very early in the next community cycle (i.e. coding to take place before xmas) Created attachment 175630 [details] [review] Bug 38457: DBIC Add AdditionalFields to AccountDebitType Created attachment 175631 [details] [review] Bug 38457: Add additional fields to debit types Test plan, k-t-d: 1) Before defining any additional fields for account_debit_types, confirm that the 'Additional fields' section does not appear when attempting to add a new or edit an existing debit type. 2) Add a new additional field to 'account_debit_types': <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_types 3) Click 'New field'. Add a name. Click Save. 4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category (one repeatable, one not repeatable) 5) Edit an account debit type: <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL 6) Input various values in the different additional fields. Click 'Submit' 7) Edit the same debit type again and note the additional fields added in the previous step are visible <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL Created attachment 175633 [details] [review] Bug 38457: Add additional fields to debit display This patch adds the previously added additional fields to the display in the debit types management page table Add additional fields to Created attachment 176789 [details] [review] Bug 38457: DBIC Add AdditionalFields to AccountDebitType Sponsored-by: PTFS Europe <https://ptfs-europe.com> Created attachment 176790 [details] [review] Bug 38457: Add additional fields to debit types Test plan, k-t-d: 1) Before defining any additional fields for account_debit_types, confirm that the 'Additional fields' section does not appear when attempting to add a new or edit an existing debit type. 2) Add a new additional field to 'account_debit_types': <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_types 3) Click 'New field'. Add a name. Click Save. 4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category (one repeatable, one not repeatable) 5) Edit an account debit type: <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL 6) Input various values in the different additional fields. Click 'Submit' 7) Edit the same debit type again and note the additional fields added in the previous step are visible <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL Sponsored-by: PTFS Europe <https://ptfs-europe.com> Created attachment 176791 [details] [review] Bug 38457: Add additional fields to debit display This patch adds the previously added additional fields to the display in the debit types management page table Sponsored-by: PTFS Europe <https://ptfs-europe.com> Added sponsorship lines and this is about to get pushed to a site we're implementing right now so should be signed off soon. Created attachment 178394 [details] [review] Bug 38457: DBIC Add AdditionalFields to AccountDebitType Sponsored-by: PTFS Europe <https://ptfs-europe.com> Created attachment 178395 [details] [review] Bug 38457: Add additional fields to debit types Test plan, k-t-d: 1) Before defining any additional fields for account_debit_types, confirm that the 'Additional fields' section does not appear when attempting to add a new or edit an existing debit type. 2) Add a new additional field to 'account_debit_types': <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_types 3) Click 'New field'. Add a name. Click Save. 4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category (one repeatable, one not repeatable) 5) Edit an account debit type: <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL 6) Input various values in the different additional fields. Click 'Submit' 7) Edit the same debit type again and note the additional fields added in the previous step are visible <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL Sponsored-by: PTFS Europe <https://ptfs-europe.com> Created attachment 178396 [details] [review] Bug 38457: Add additional fields to debit display This patch adds the previously added additional fields to the display in the debit types management page table Sponsored-by: PTFS Europe <https://ptfs-europe.com> Created attachment 178397 [details] [review] Bug 38457: Update record_id to VARCHAR(80) This is required to allow for long primary keys from the account_debit_types table. Created attachment 178398 [details] [review] Bug 38457: DBIC Schema I tried to test this on PTFS Europe's sandbox but account_debit_types table does not come visible in Additional fields page and if I use the direct address <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_types you can add a field but it does not show in Debit types page. Is it possible to test this on sandbox? Hmm.. I would think this is testable via sandboxes.. I'm just confirming that now myself. We have deployed this, backported to 24.11.x, to a customer site who are going live in the next month and it's working well there currently. I'll report back OK.. for me at least it looks like sha1 application issues.. i.e the patches never actually applied to the sandbox. That's good in so much as it doesn't point to an issue with the patchset here but it does show one of the challenges with the sandboxes output.. they don't report failures to apply patches properly unless you know what to look for in the logs. patch isn't applying cleanly in k-t-d either Applying: Bug 38457: Add additional fields to debit types error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt). error: could not build fake ancestor Patch failed at 0001 Bug 38457: Add additional fields to debit types Created attachment 180494 [details] [review] Bug 38457: DBIC Add AdditionalFields to AccountDebitType Sponsored-by: PTFS Europe <https://ptfs-europe.com> Created attachment 180495 [details] [review] Bug 38457: Add additional fields to debit types Test plan, k-t-d: 1) Before defining any additional fields for account_debit_types, confirm that the 'Additional fields' section does not appear when attempting to add a new or edit an existing debit type. 2) Add a new additional field to 'account_debit_types': <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_types 3) Click 'New field'. Add a name. Click Save. 4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category (one repeatable, one not repeatable) 5) Edit an account debit type: <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL 6) Input various values in the different additional fields. Click 'Submit' 7) Edit the same debit type again and note the additional fields added in the previous step are visible <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL Sponsored-by: PTFS Europe <https://ptfs-europe.com> Created attachment 180496 [details] [review] Bug 38457: Add additional fields to debit display This patch adds the previously added additional fields to the display in the debit types management page table Sponsored-by: PTFS Europe <https://ptfs-europe.com> Created attachment 180497 [details] [review] Bug 38457: Update record_id to VARCHAR(80) This is required to allow for long primary keys from the account_debit_types table. Created attachment 180498 [details] [review] Bug 38457: DBIC Schema Created attachment 180519 [details] [review] Bug 38457: DBIC Add AdditionalFields to AccountDebitType Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Created attachment 180520 [details] [review] Bug 38457: Add additional fields to debit types Test plan, k-t-d: 1) Before defining any additional fields for account_debit_types, confirm that the 'Additional fields' section does not appear when attempting to add a new or edit an existing debit type. 2) Add a new additional field to 'account_debit_types': <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_types 3) Click 'New field'. Add a name. Click Save. 4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category (one repeatable, one not repeatable) 5) Edit an account debit type: <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL 6) Input various values in the different additional fields. Click 'Submit' 7) Edit the same debit type again and note the additional fields added in the previous step are visible <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Created attachment 180521 [details] [review] Bug 38457: Add additional fields to debit display This patch adds the previously added additional fields to the display in the debit types management page table Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Created attachment 180522 [details] [review] Bug 38457: Update record_id to VARCHAR(80) This is required to allow for long primary keys from the account_debit_types table. Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Created attachment 180523 [details] [review] Bug 38457: DBIC Schema Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> I'm not sure if this was testable in sandbox but I tested this in a Bywater's sandbox. Some notes: * A new additional field can be added on that page. * If I try to edit a existing debit type I get an error: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.record_id' in 'on clause' at /kohadevbox/koha/Koha/Objects.pm line 319 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 * If I add a new debit type, the newly added additional field is visible and can be added/selected but when I save the debit type I get an error message"An error occurred when saving this debit type. Check the logs for details.." The debit type is still added. * If I try to edit the new debit type, I get the same error as with editing existing debit type: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.record_id' in 'on clause' at /kohadevbox/koha/Koha/Objects.pm line 319 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 Looks like there are a couple small rebases needed here. Created attachment 182384 [details] [review] Bug 38457: DBIC Add AdditionalFields to AccountDebitType Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Created attachment 182385 [details] [review] Bug 38457: Add additional fields to debit types Test plan, k-t-d: 1) Before defining any additional fields for account_debit_types, confirm that the 'Additional fields' section does not appear when attempting to add a new or edit an existing debit type. 2) Add a new additional field to 'account_debit_types': <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_types 3) Click 'New field'. Add a name. Click Save. 4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category (one repeatable, one not repeatable) 5) Edit an account debit type: <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL 6) Input various values in the different additional fields. Click 'Submit' 7) Edit the same debit type again and note the additional fields added in the previous step are visible <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Created attachment 182386 [details] [review] Bug 38457: Add additional fields to debit display This patch adds the previously added additional fields to the display in the debit types management page table Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Created attachment 182387 [details] [review] Bug 38457: Update record_id to VARCHAR(80) This is required to allow for long primary keys from the account_debit_types table. Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Created attachment 182388 [details] [review] Bug 38457: DBIC Schema Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> That was an interesting rebase.. the auto tidy stuff had royally screwed up the intermediary patches Anywho.. rebased now and restoring status of the bug to PQA as it's had Hannah signoff and Laura QA Please use "say_success" :) + say $out "Converted record_id to VARCHAR(80)"; This appears pretty contained to the configuration page for now. I'd be interested in some use cases/best practice for documentation and when demoing this. Pushed for 25.05! Well done everyone, thank you! Hm, something is not quite right here, but I am not spotting it right now, can you please take a look? https://jenkins.koha-community.org/job/Koha_Main_MariaDB_update/155/console Created attachment 182575 [details] [review] Bug 38457: (follow-up) Update record_id to VARCHAR(80) |