Skip to content
Snippets Groups Projects
Commit a3ceebba authored by vivekarora's avatar vivekarora
Browse files

Set name from title if that is not given in API

parent 0ebdbd37
Branches
Tags
No related merge requests found
......@@ -64,7 +64,11 @@ function civicrm_api3_action_schedule_create($params) {
if (isset($params['id']) && !CRM_Utils_Rule::integer($params['id'])) {
return civicrm_api3_create_error('Invalid value for ID');
}
if (!array_key_exists('name', $params) && !array_key_exists('id', $params)) {
$params['name'] = CRM_Utils_String::munge($params['title']);
}
$actionSchedule = new CRM_Core_BAO_ActionSchedule();
$actionSchedule = CRM_Core_BAO_ActionSchedule::add($params, $ids);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment