Skip to content
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

Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Mar 5, 2017

@@ -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');
Copy link
Contributor Author

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) &&
Copy link
Contributor Author

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;
Copy link
Contributor Author

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'])) {
Copy link
Contributor Author

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

@eileenmcnaughton
Copy link
Contributor Author

@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

@seamuslee001
Copy link
Contributor

@eileenmcnaughton i tested the batch update and couldn't see any issue here so i think we can merge this

@eileenmcnaughton eileenmcnaughton merged commit 442f7f9 into civicrm:master Mar 7, 2017
@eileenmcnaughton eileenmcnaughton deleted the activity_cust_date branch March 7, 2017 21:29
monishdeb pushed a commit to monishdeb/civicrm-core that referenced this pull request May 2, 2017
CRM-20219 Update activity fields in profiles to use date picker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants