Bug 40431

Summary: Subject should be mandatory when using the free form to send an email to a patron
Product: Koha Reporter: Michaela Sieber <michaela.sieber>
Component: NoticesAssignee: Eric Garcia <cubingguy714>
Status: Failed QA --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: cubingguy714, flaterdavid, kebliss, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29393
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 29393    
Bug Blocks:    
Attachments: Bug 40431: Make subject required for emails in Add message modal
Bug 40431: Make subject required for emails in Add message modal

Description Michaela Sieber 2025-07-17 09:28:25 UTC
With Bug 29393 the ability to send emails from patron details page was introduced. This is a great feature, but the subject should be a mandatory field.

to reproduce:
  - go to a patron's details page
  - click on "Add message" in tools bar
  - choose "Email" in "Add a message for"
  - fill the body / message manually but leave the subject emty
  - Save
  - Check the message in the patrons notices cgi-bin/koha/members/notices.pl?borrowernumber=xxxxx
Comment 1 Eric Garcia 2025-07-21 16:12:24 UTC
Created attachment 184446 [details] [review]
Bug  40431: Make subject required for emails in Add message modal

Test Plan:
1. Apply patch
2. Go to patron's detail page
3. Click "Add message" in tools bar
4. Fill the body, but leave the subject empty
5. Notice it requires you to fill out subject before saving
Comment 2 David Flater 2025-07-21 17:02:46 UTC
Created attachment 184450 [details] [review]
Bug 40431: Make subject required for emails in Add message modal

Test Plan:
1. Apply patch
2. Go to patron's detail page
3. Click "Add message" in tools bar
4. Fill the body, but leave the subject empty
5. Notice it requires you to fill out subject before saving

Signed-off-by: David Flater <flaterdavid@gmail.com>
Comment 3 Marcel de Rooy 2025-07-25 07:55:34 UTC
Please explain:

                             <li class="form-group form-row" id="subject_form" style="display: none;">
                                 <label for="borrower_subject" class="col-form-label">Subject:</label>
-                                <input type="text" size="60" name="borrower_subject" class="form-control" id="borrower_subject" />
+                                <input type="text" size="60" name="borrower_subject" class="form-control" id="borrower_subject" required="required" />


The field is not displayed but required ?

Changing status for need of feedback.