PM-2376: New Feature: We need the ability to modify the Subject tables [bpmn]

This commit is contained in:
Paula V. Quispe
2015-04-24 15:09:02 -04:00
parent ff7097f4a7
commit f5faa5dc7e
2 changed files with 12 additions and 7 deletions

View File

@@ -19,9 +19,11 @@ class ActionsByEmail
case 'configuration': case 'configuration':
require_once 'classes/model/AbeConfiguration.php'; require_once 'classes/model/AbeConfiguration.php';
$abeConfigurationInstance = new \AbeConfiguration(); $abeConfigurationInstance = new \AbeConfiguration();
$noteValues = json_decode($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE']); if(isset($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'])){
foreach ($noteValues as $value) { $noteValues = json_decode($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE']);
$feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'] = $value; foreach ($noteValues as $value) {
$feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'] = $value;
}
} }
$abeConfigurationInstance->createOrUpdate($feature['fields']); $abeConfigurationInstance->createOrUpdate($feature['fields']);
break; break;
@@ -50,8 +52,12 @@ class ActionsByEmail
$result->next(); $result->next();
$configuration = array(); $configuration = array();
if ($configuration = $result->getRow()) { if ($configuration = $result->getRow()) {
$configuration['ABE_EMAIL_FIELD_VALUE'] = $configuration['ABE_EMAIL_FIELD']; $configuration['ABE_UID'] = $configuration['ABE_UID'];
$configuration['ABE_ACTION_FIELD_VALUE'] = $configuration['ABE_ACTION_FIELD']; $configuration['ABE_TYPE'] = $configuration['ABE_TYPE'];
$configuration['ABE_TEMPLATE'] = $configuration['ABE_TEMPLATE'];
$configuration['ABE_SUBJECT_FIELD'] = $configuration['ABE_SUBJECT_FIELD'];
$configuration['ABE_EMAIL_FIELD'] = $configuration['ABE_EMAIL_FIELD'];
$configuration['ABE_ACTION_FIELD'] = $configuration['ABE_ACTION_FIELD'];
$configuration['ABE_CASE_NOTE_IN_RESPONSE'] = $configuration['ABE_CASE_NOTE_IN_RESPONSE'] ? '["1"]' : '[]'; $configuration['ABE_CASE_NOTE_IN_RESPONSE'] = $configuration['ABE_CASE_NOTE_IN_RESPONSE'] ? '["1"]' : '[]';
} }
$configuration['feature'] = 'ActionsByEmail'; $configuration['feature'] = 'ActionsByEmail';

View File

@@ -118,12 +118,11 @@ class Activity extends Api
} }
$task = new \ProcessMaker\BusinessModel\Task(); $task = new \ProcessMaker\BusinessModel\Task();
$properties = $task->updateProperties($prj_uid, $act_uid, $request_data); $properties = $task->updateProperties($prj_uid, $act_uid, $request_data);
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if (\PMLicensedFeatures if (\PMLicensedFeatures
::getSingleton() ::getSingleton()
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) { ->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
if (isset($request_data['properties']['_features']) && !empty($request_data['properties']['_features']['ActionsByEmail']['fields']['ABE_UID'])) { if (isset($request_data['properties']['_features'])) {
$actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail(); $actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail();
$actionsByEmailService->saveConfiguration($request_data['properties']['_features']); $actionsByEmailService->saveConfiguration($request_data['properties']['_features']);
} }