Bug 34622 - SMTP server edit page unsets is_default if editing default server
Summary: SMTP server edit page unsets is_default if editing default server
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Pedro Amorim
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 27424
Blocks:
  Show dependency treegraph
 
Reported: 2023-08-25 16:23 UTC by Pedro Amorim
Modified: 2024-07-04 20:37 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04
Circulation function:


Attachments
Bug 34622: Fix store default query (1.01 KB, patch)
2023-08-25 16:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34622: Fix store default query (1.17 KB, patch)
2023-09-12 15:58 UTC, Emily-Rose Francoeur
Details | Diff | Splinter Review
Bug 34622: Fix store default query (1.22 KB, patch)
2023-09-18 18:46 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2023-08-25 16:23:35 UTC
To reproduce:
1) Create a new SMTP Server (tick "Default server" checkbox). Save.
2) Now edit that same SMTP Server, don't change anything. Save.
3) Notice how it no longer is default, from the list or by editing again, or by querying SELECT is_default from smtp_servers -> returns is_default:0
Comment 1 Pedro Amorim 2023-08-25 16:27:47 UTC
Created attachment 154837 [details] [review]
Bug 34622: Fix store default query

Exclude self smtp server from all the servers being updated to not default if self is_default
Comment 2 Emily-Rose Francoeur 2023-09-12 15:58:45 UTC
Created attachment 155561 [details] [review]
Bug 34622: Fix store default query

Exclude self smtp server from all the servers being updated to not default if self is_default

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Comment 3 Kyle M Hall (khall) 2023-09-18 18:46:06 UTC
Created attachment 155858 [details] [review]
Bug 34622: Fix store default query

Exclude self smtp server from all the servers being updated to not default if self is_default

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-09-19 19:35:44 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-09-21 06:10:23 UTC
Pushed to 23.05.x for 23.05.04
Comment 6 Matt Blenkinsop 2023-10-12 16:05:55 UTC
Dependency missing from 22.11.x - not backporting