-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-20219 Update activity fields in profiles to use date picker #9935
CRM-20219 Update activity fields in profiles to use date picker #9935
Conversation
eileenmcnaughton
commented
Mar 5, 2017
•
edited by civicrm-builder
Loading
edited by civicrm-builder
- CRM-20219: Switch activity date time to use datepicker in profiles
20b1941
to
2a66c16
Compare
@@ -95,7 +95,7 @@ public function buildQuickForm() { | |||
$ufGroupId = $this->get('ufGroupId'); | |||
|
|||
if (!$ufGroupId) { | |||
CRM_Core_Error::fatal('ufGroupId is missing'); | |||
throw new CRM_Core_Exception('The profile id is missing'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a general improvement, unrelated
@@ -108,7 +108,7 @@ public function buildQuickForm() { | |||
$suppressFields = FALSE; | |||
$removehtmlTypes = array('File', 'Autocomplete-Select'); | |||
foreach ($this->_fields as $name => $field) { | |||
if ($cfID = CRM_Core_BAO_CustomField::getKeyID($name) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused var, tidy up
$dao->fetch(); | ||
|
||
// Get Activity Type ID | ||
$value['activity_type_id'] = $dao->activity_type_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all this just to backfill those fields if not in the form. Not required if we use the api
@@ -228,10 +231,6 @@ public function postProcess() { | |||
$value['details'] = $value['activity_details']; | |||
} | |||
|
|||
if (!empty($value['activity_duration'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested & once using the api this doesn't add anything
@seamuslee001 I tried to figure out how to test this. In 4.6 there is a functionality to update an activity & contact at the same time, e.g at a url like civicrm/profile/edit?result=1&id={$contactID}&aid={$activityID}&gid={$profileID} I am pretty sure that functionality is broken in 4.7, prior to this. The other place I could expose this field was batch update from an activity search. I found some breakages pre-existing here (activity type is rendered as an integer), but I was able to demonstrate the activity date field updated ok |
@eileenmcnaughton i tested the batch update and couldn't see any issue here so i think we can merge this |
CRM-20219 Update activity fields in profiles to use date picker