If an SMS::Send driver ( such as Twilio ) requires additional parameters, those parameters have to be placed in a yaml file named after the SMS::Send driver, and the path to that file specified in the Koha conf file. It would be good if we had the option to specify those parameters in a YAML system preference instead. This would be less complicated and avoid requiring an administrator to update that data from the backend.
Created attachment 161945 [details] [review] Bug 36051: Add option to specify SMS::Send driver parameters in a system preference instead of a file If an SMS::Send driver ( such as Twilio ) requires additional parameters, those parameters have to be placed in a yaml file named after the SMS::Send driver, and the path to that file specified in the Koha conf file. It would be good if we had the option to specify those parameters in a YAML system preference instead. This would be less complicated and avoid requiring an administrator to update that data from the backend. Test Plan: 1) Set up an SMS::Send driver that requires additional options; a Twilio account meets these requirements and can be created for free. Set this up using the traditional file based system. 2) Verify you can send SMS messages 3) Move the contents of that file into the new system preference SMSSendAdditionalOptions 4) Verify you can still send SMS messages 5) Delete the file 6) Verify yet again you can still send SMS messages!
Can we use C4::Context->yaml_preference here Kyle?
(In reply to Martin Renvoize from comment #2) > Can we use C4::Context->yaml_preference here Kyle? TIL! Can do!
Created attachment 162115 [details] [review] Bug 36051 (QA follow-up): Use yaml_preference
Created attachment 162116 [details] [review] Bug 36051: Add option to specify SMS::Send driver parameters in a system preference If an SMS::Send driver ( such as Twilio ) requires additional parameters, those parameters have to be placed in a yaml file named after the SMS::Send driver, and the path to that file specified in the Koha conf file. It would be good if we had the option to specify those parameters in a YAML system preference instead. This would be less complicated and avoid requiring an administrator to update that data from the backend. Test Plan: 1) Set up an SMS::Send driver that requires additional options; a Twilio account meets these requirements and can be created for free. Set this up using the traditional file based system. 2) Verify you can send SMS messages 3) Move the contents of that file into the new system preference SMSSendAdditionalOptions 4) Verify you can still send SMS messages 5) Delete the file 6) Verify yet again you can still send SMS messages! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 162117 [details] [review] Bug 36051: (QA follow-up): Use yaml_preference Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 162118 [details] [review] Bug 36051: (QA follow-up) Use IGNORE in INSERT Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Simple, useful improvement. All works as expected, is resilient to mistakes and QA scripts are happy.. Going for a straight PQA here.
Pushed for 24.05! Well done everyone, thank you!
Not backported to 23.11.x