Bug 38669

Summary: Staff interface: 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: Pushed to main --- QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: david, martin.renvoize, pedro.amorim, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch 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:
25.05.00
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
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
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
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
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.
Comment 9 Pedro Amorim 2025-03-26 16:37:47 UTC Comment hidden (obsolete)
Comment 10 Pedro Amorim 2025-03-26 16:37:52 UTC Comment hidden (obsolete)
Comment 11 Pedro Amorim 2025-03-26 16:37:57 UTC Comment hidden (obsolete)
Comment 12 Pedro Amorim 2025-03-26 16:38:47 UTC
Rebased for main (on top of tidied bug 35604)
Comment 13 Pedro Amorim 2025-03-26 17:09:37 UTC
Created attachment 179737 [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 14 Pedro Amorim 2025-03-26 17:09:40 UTC
Created attachment 179738 [details] [review]
Bug 38669: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t
Comment 15 Pedro Amorim 2025-03-26 17:09:42 UTC
Created attachment 179739 [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.
Comment 16 Pedro Amorim 2025-04-02 14:11:52 UTC
Created attachment 180394 [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 17 Pedro Amorim 2025-04-02 14:11:55 UTC
Created attachment 180395 [details] [review]
Bug 38669: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t
Comment 18 Pedro Amorim 2025-04-02 14:11:57 UTC
Created attachment 180396 [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.
Comment 19 Tomás Cohen Arazi (tcohen) 2025-04-03 09:14:20 UTC
Created attachment 180466 [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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 20 Tomás Cohen Arazi (tcohen) 2025-04-03 09:14:23 UTC
Created attachment 180467 [details] [review]
Bug 38669: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 21 Tomás Cohen Arazi (tcohen) 2025-04-03 09:14:25 UTC
Created attachment 180468 [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.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 22 Katrin Fischer 2025-04-22 06:49:34 UTC
Pushed for 25.05!

Well done everyone, thank you!