Bug 36276 - Cannot edit identity provider after creation
Summary: Cannot edit identity provider after creation
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Owen Leonard
QA Contact: David Cook
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-07 15:12 UTC by Olivier Hubert
Modified: 2024-10-21 18:06 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the identity provider and domain forms so that the information is now editable (Administration > Additional parameters > Identity providers).
Version(s) released in:
24.11.00,24.05.04
Circulation function:


Attachments
Bug 36276: Fix editing of identity provider and domains (1.90 KB, patch)
2024-07-09 18:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36276: Fix editing of identity provider and domains (1.95 KB, patch)
2024-07-09 19:14 UTC, David Nind
Details | Diff | Splinter Review
Bug 36276: Fix editing of identity provider and domains (2.00 KB, patch)
2024-07-09 23:41 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hubert 2024-03-07 15:12:42 UTC
Once an identity provider is created, it is no longer possible to easily edit it, as the form for editing the identity provider contains no value. Moreover, the provider's name is replace with " (quotation mark).

Steps to reproduce:
1. Launch KTD or Koha instance using up-to-date master branch.
2. In the Administration menu, go to the Identity Providers page.
3. Click on the button to create a new identity provider.
4. Fill in the required fields, using test data.
5. Save the identity provider.
6. Click the "Edit" button for the newly created identity provider.
7. Notice that the form's fields are empty and the provider's name has been changed to ".
Comment 1 David Nind 2024-06-24 08:11:25 UTC
I can confirm this behaviour.
Comment 2 zefanjas 2024-07-05 07:37:18 UTC
I can confirm this, too. Happens also, if you want to edit an Identity Provider Domain.
Comment 3 Owen Leonard 2024-07-09 18:48:01 UTC
Created attachment 168682 [details] [review]
Bug 36276: Fix editing of identity provider and domains

This patch fixes identity_providers.pl to remove the "cud-" prefix for
two operations which are not POSTed: editing identity providers and
editing domains.

To test, apply the patch and restart services.

- Go to Administration -> Identity providers.
- If necessary, create an identity provider and then click "Manage
  domains" -> New identity provider domain to create a new domain.
- From the list of domains, click "Edit"
- The edit form should appear with all the correct details prefilled.
  - Check that the page title, breadcrumbs, and page header all show the
    correct domain.
  - Make a change to the domain and confirm that the changes are saved.

- From the list of identity providers, click "Edit"
- This form should also load correctly.
- Submitted changes should be saved correctly.

Sponsored-by: Athens County Public Libraries
Comment 4 David Nind 2024-07-09 19:14:26 UTC
Created attachment 168683 [details] [review]
Bug 36276: Fix editing of identity provider and domains

This patch fixes identity_providers.pl to remove the "cud-" prefix for
two operations which are not POSTed: editing identity providers and
editing domains.

To test, apply the patch and restart services.

- Go to Administration -> Identity providers.
- If necessary, create an identity provider and then click "Manage
  domains" -> New identity provider domain to create a new domain.
- From the list of domains, click "Edit"
- The edit form should appear with all the correct details prefilled.
  - Check that the page title, breadcrumbs, and page header all show the
    correct domain.
  - Make a change to the domain and confirm that the changes are saved.

- From the list of identity providers, click "Edit"
- This form should also load correctly.
- Submitted changes should be saved correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Cook 2024-07-09 23:41:17 UTC
Created attachment 168686 [details] [review]
Bug 36276: Fix editing of identity provider and domains

This patch fixes identity_providers.pl to remove the "cud-" prefix for
two operations which are not POSTed: editing identity providers and
editing domains.

To test, apply the patch and restart services.

- Go to Administration -> Identity providers.
- If necessary, create an identity provider and then click "Manage
  domains" -> New identity provider domain to create a new domain.
- From the list of domains, click "Edit"
- The edit form should appear with all the correct details prefilled.
  - Check that the page title, breadcrumbs, and page header all show the
    correct domain.
  - Make a change to the domain and confirm that the changes are saved.

- From the list of identity providers, click "Edit"
- This form should also load correctly.
- Submitted changes should be saved correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 6 David Cook 2024-07-09 23:41:35 UTC
Thanks, Owen. Legend!
Comment 7 Katrin Fischer 2024-07-11 10:06:14 UTC
For my understanding... I thought that any operation that requires a data change should use POST and cud- - Why are we moving the other direction here with these patches?
Comment 8 Katrin Fischer 2024-07-11 11:43:19 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 9 Nick Clemens (kidclamp) 2024-09-17 10:52:43 UTC
(In reply to Katrin Fischer from comment #7)
> For my understanding... I thought that any operation that requires a data
> change should use POST and cud- - Why are we moving the other direction here
> with these patches?

The edit_form op is loading the form, it's read only to populate the page.
When edits are saved the op is 'cud-edit_save'
Comment 10 Katrin Fischer 2024-09-17 11:30:55 UTC
(In reply to Nick Clemens (kidclamp) from comment #9)
> (In reply to Katrin Fischer from comment #7)
> > For my understanding... I thought that any operation that requires a data
> > change should use POST and cud- - Why are we moving the other direction here
> > with these patches?
> 
> The edit_form op is loading the form, it's read only to populate the page.
> When edits are saved the op is 'cud-edit_save'

Thanks for explaining!
Comment 11 Lucas Gass (lukeg) 2024-09-18 14:22:45 UTC
Backported to 24.05.x for upcoming 24.05.04
Comment 12 Fridolin Somers 2024-10-21 12:49:10 UTC
CUD not in 23.11.x
Comment 13 David Nind 2024-10-21 18:06:09 UTC
This fixes a bug - no change to the interface, no changes required to the manual.