]> git.koha-community.org Git - koha.git/commit
Bug 37891: Submit SMS related data even if SMSSendDriver is empty.
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Wed, 11 Sep 2024 10:40:17 +0000 (10:40 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 2 Oct 2024 09:16:00 +0000 (10:16 +0100)
commit7c6934f845c4ce370b257b6f510db5f2ad306d4e
treea85665821e1e84e9073f9a22a53e05c4eae374b8
parente8170909f4ab3b216be815c04711529f36868913
Bug 37891: Submit SMS related data even if SMSSendDriver is empty.

The bug is caused by the SMS data not being submitted as its fieldset is disabled if SMSSendDriver is empty.
This causes the SMS instance of the notice to not be updated when the edit happens, becoming out of sync.
Once it becomes out of sync with the other notices of same code but different transport_type, the 'GROUP BY branchcode,module,code,name,branchname' in letter.pl will fail, as the name no longer matches, listing the same notice twice on the notices table.

This patch updates the logic on the template to have the SMS input elements be disabled/readonly instead of having disabled='disabled' on the SMS fieldset.
This keeps the same functionality i.e. staff member is unable to edit SMS notice if SMSSendDriver is disabled, but ensures that SMS related data is submitted to the controller when the notice edit save happens.

Test plan:
1) Visit notices and slips:
  <staff_url>/cgi-bin/koha/tools/letter.pl
2) Search for a notice code e.g. 'ILL_REQUEST_UPDATE'.
3) Notice only one result is returned. Click 'Edit'.
4) Edit the 'Name'. Click 'Save'.
5) Repeat 2. Notice two results are now returned.
6) Apply patch. Repeat test plan. Notice only one result is returned at the end.

Signed-off-by: Jason Robb <jrobb@sekls.org>
Amended-by: Jonathan Druart
Align

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt