Bug 38669

Summary: ILL - Staff: Automatic backend screen should provide option to go back to form
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ILLAssignee: Pedro Amorim <pedro.amorim>
Status: Passed QA --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: david, martin.renvoize, pedro.amorim, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds a "Return to form" link on the confirm backend page, so that the request details can be updated (for example, to fix a failure reason in the backend availability check).
Version(s) released in:
Circulation function:
Bug Depends on: 35604    
Bug Blocks: 38819    
Attachments: Bug 38669: Add 'Return to form' button at top of auto backend screen
Bug 38669: Add 'Return to form' button at top of auto backend screen
Bug 38669: Add 'Return to form' button at top of auto backend screen
Bug 38669: (QA follow-up): Fix find-missing-op-in-forms.t
Bug 38669: (QA follow-up): Prevent multiple occurrences of 'op' in the form

Description Pedro Amorim 2024-12-10 17:31:15 UTC
On the automatic backend screen, each backend may provide different reasons to why the availability check has failed, and sometimes this can be "fixed" by updating the form metadata.
Because of this, there should be the possibility of going back to the form from this screen.
Comment 1 Pedro Amorim 2024-12-10 17:33:15 UTC
Created attachment 175360 [details] [review]
Bug 38669: Add 'Return to form' button at top of auto backend screen

Follow test plan from bug 35604, but notice you now have the possibility to return to the form
Comment 2 David Nind 2024-12-14 17:20:06 UTC
Created attachment 175473 [details] [review]
Bug 38669: Add 'Return to form' button at top of auto backend screen

Follow test plan from bug 35604, but notice you now have the possibility to return to the form

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2024-12-14 17:39:56 UTC
Testing notes (using KTD):

1. One of the tests no longer passes after applying the patch for this bug (it passed with bug 35604 applied):

prove t/db_dependent/Koha/ILL/Backends.t
t/db_dependent/Koha/ILL/Backends.t .. 1/4 
    #   Failed test 'Only one backend installed, happens to be a plugin'
    #   at t/db_dependent/Koha/ILL/Backends.t line 59.
    #     Structures begin differing at:
    #          $got->[0] = 'PluginBackend'
    #     $expected->[0] = 'Test Plugin'

    #   Failed test 'Two backends are installed, one plugin and one directory backend'
    #   at t/db_dependent/Koha/ILL/Backends.t line 75.
    #     Structures begin differing at:
    #          $got->[1] = 'PluginBackend'
    #     $expected->[1] = 'Test Plugin'
    # Looks like you failed 2 tests of 2.

#   Failed test 'installed_backends() tests'
#   at t/db_dependent/Koha/ILL/Backends.t line 84.
# Looks like you failed 1 test of 4.
t/db_dependent/Koha/ILL/Backends.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 

Test Summary Report
-------------------
t/db_dependent/Koha/ILL/Backends.t (Wstat: 256 (exited 1) Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=1, Tests=4,  1 wallclock secs ( 0.02 usr  0.00 sys +  1.05 cusr  0.19 csys =  1.26 CPU)
Result: FAIL
Comment 4 Pedro Amorim 2024-12-17 09:23:55 UTC
(In reply to David Nind from comment #3)
> Testing notes (using KTD):
> 
> 1. One of the tests no longer passes after applying the patch for this bug
> (it passed with bug 35604 applied):
> 
> prove t/db_dependent/Koha/ILL/Backends.t
> t/db_dependent/Koha/ILL/Backends.t .. 1/4 
>     #   Failed test 'Only one backend installed, happens to be a plugin'
>     #   at t/db_dependent/Koha/ILL/Backends.t line 59.
>     #     Structures begin differing at:
>     #          $got->[0] = 'PluginBackend'
>     #     $expected->[0] = 'Test Plugin'
> 
>     #   Failed test 'Two backends are installed, one plugin and one
> directory backend'
>     #   at t/db_dependent/Koha/ILL/Backends.t line 75.
>     #     Structures begin differing at:
>     #          $got->[1] = 'PluginBackend'
>     #     $expected->[1] = 'Test Plugin'
>     # Looks like you failed 2 tests of 2.
> 
> #   Failed test 'installed_backends() tests'
> #   at t/db_dependent/Koha/ILL/Backends.t line 84.
> # Looks like you failed 1 test of 4.
> t/db_dependent/Koha/ILL/Backends.t .. Dubious, test returned 1 (wstat 256,
> 0x100)
> Failed 1/4 subtests 
> 
> Test Summary Report
> -------------------
> t/db_dependent/Koha/ILL/Backends.t (Wstat: 256 (exited 1) Tests: 4 Failed: 1)
>   Failed test:  4
>   Non-zero exit status: 1
> Files=1, Tests=4,  1 wallclock secs ( 0.02 usr  0.00 sys +  1.05 cusr  0.19
> csys =  1.26 CPU)
> Result: FAIL

Hi David, sorry I wasn't clear in my test plan.
It appears you're running this after following the test plan of 35604 and you still have the "PluginBackend" plugin installed.
You can't have any plugins installed when running tests else they'll very likely fail.
Comment 5 David Nind 2024-12-17 18:45:20 UTC
(In reply to Pedro Amorim from comment #4)
> Hi David, sorry I wasn't clear in my test plan.
> It appears you're running this after following the test plan of 35604 and
> you still have the "PluginBackend" plugin installed.
> You can't have any plugins installed when running tests else they'll very
> likely fail.

No worries. Thanks Pedro!
Comment 6 Martin Renvoize (ashimema) 2025-01-08 17:27:12 UTC
Created attachment 176277 [details] [review]
Bug 38669: Add 'Return to form' button at top of auto backend screen

Follow test plan from bug 35604, but notice you now have the possibility to return to the form

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd <https://ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Pedro Amorim 2025-01-15 13:40:20 UTC
Created attachment 176571 [details] [review]
Bug 38669: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t
Comment 8 Pedro Amorim 2025-01-20 13:45:19 UTC
Created attachment 176812 [details] [review]
Bug 38669: (QA follow-up): Prevent multiple occurrences of 'op' in the form

This may happen if getting to the ILL auto screen from the type disclaimer screen for example
Which causes the 'return to request'm form submission to have 2 'op's, causing error.