Bug 37623 - t/db_dependent/Letters.t tests fails to consider EmailFieldPrimary system preference
Summary: t/db_dependent/Letters.t tests fails to consider EmailFieldPrimary system pre...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Aleisha Amohia
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 33192
Blocks: 37598
  Show dependency treegraph
 
Reported: 2024-08-13 03:04 UTC by Aleisha Amohia
Modified: 2024-11-03 23:58 UTC (History)
4 users (show)

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


Attachments
Bug 37623: Make t/db_dependent/Letters.t idempotent (1.41 KB, patch)
2024-08-13 03:11 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 37623: Make t/db_dependent/Letters.t idempotent (1.47 KB, patch)
2024-08-15 16:37 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 37623: Make t/db_dependent/Letters.t idempotent (1.57 KB, patch)
2024-08-16 06:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2024-08-13 03:04:41 UTC
The tests in t/db_dependent/Letters.t fail if EmailFieldPrimary is set to anything OTHER than:

* primary email
* first valid email address
Comment 1 Aleisha Amohia 2024-08-13 03:11:57 UTC
Created attachment 170251 [details] [review]
Bug 37623: Make t/db_dependent/Letters.t idempotent

The tests should be unaffected by system preference settings, such as EmailFieldPrimary.

To test:
1. Log into the staff interface
2. Go to Koha Administration -> Global system preferences, and search for EmailFieldPrimary
3. Change the EmailFieldPrimary preference to something other than 'primary email' and 'first valid email address', i.e. any of the following:

* alternate email
* card number
* secondary email
* selected addresses

4. Run tests t/db_dependent/Letters.t and notice they fail

5. Apply the patch

6. Run the tests again t/db_dependent/Letters.t with different settings of EmailFieldPrimary. The tests should always pass.

Sponsored-by: Pymble Ladies' College
Comment 2 Paul Derscheid 2024-08-15 16:37:30 UTC
Created attachment 170410 [details] [review]
Bug 37623: Make t/db_dependent/Letters.t idempotent

The tests should be unaffected by system preference settings, such as EmailFieldPrimary.

To test:
1. Log into the staff interface
2. Go to Koha Administration -> Global system preferences, and search for EmailFieldPrimary
3. Change the EmailFieldPrimary preference to something other than 'primary email' and 'first valid email address', i.e. any of the following:

* alternate email
* card number
* secondary email
* selected addresses

4. Run tests t/db_dependent/Letters.t and notice they fail

5. Apply the patch

6. Run the tests again t/db_dependent/Letters.t with different settings of EmailFieldPrimary. The tests should always pass.

Sponsored-by: Pymble Ladies' College
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 3 Marcel de Rooy 2024-08-16 06:28:09 UTC
Created attachment 170423 [details] [review]
Bug 37623: Make t/db_dependent/Letters.t idempotent

The tests should be unaffected by system preference settings, such as EmailFieldPrimary.

To test:
1. Log into the staff interface
2. Go to Koha Administration -> Global system preferences, and search for EmailFieldPrimary
3. Change the EmailFieldPrimary preference to something other than 'primary email' and 'first valid email address', i.e. any of the following:

* alternate email
* card number
* secondary email
* selected addresses

4. Run tests t/db_dependent/Letters.t and notice they fail

5. Apply the patch

6. Run the tests again t/db_dependent/Letters.t with different settings of EmailFieldPrimary. The tests should always pass.

Sponsored-by: Pymble Ladies' College
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Katrin Fischer 2024-08-19 15:31:13 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass (lukeg) 2024-09-12 21:56:21 UTC
Backported to 24.05.x for upcoming 24.05.04
Comment 6 Fridolin Somers 2024-10-21 12:23:59 UTC
Pushed to 23.11.x for 23.11.10
Comment 7 Wainui Witika-Park 2024-11-03 23:58:03 UTC
Not backporting to 23.05.x unless requested