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-21456 : Relationship end date not set when creating resolved cases #11301

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

jitendrapurohit
Copy link
Contributor

@jitendrapurohit jitendrapurohit commented Nov 20, 2017

Overview

Set relationship end date while creating resolved cases.

Before

  1. Relationship end date is not set when creating a new case with resolved status.

  2. When a Resolved case is created via api(through explorer or via webform). Case end date is not automatically stored. It is correctly set from the "New Case" form.

See more details in jira issue.

After

Both the above issues are fixed.

Technical Details

This PR migrates the case end date calculation from Form to BAO layer, so that it is executed from API too.

Comments

Added unit test


@jitendrapurohit
Copy link
Contributor Author

jenkins, retest this please

@@ -92,6 +92,11 @@ public static function &create(&$params) {
// CRM-20958 - These fields are managed by MySQL triggers. Watch out for clients resaving stale timestamps.
unset($params['created_date']);
unset($params['modified_date']);
$caseStatus = CRM_Case_PseudoConstant::caseStatus('name');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a space before this line

@omarabuhussein
Copy link
Member

Checked the code and did some UI testing and it looks okay, just left minor comment@jitendrapurohit

@eileenmcnaughton
Copy link
Contributor

I'm going to merge this based on @omarabuhussein review. I realise there is a stylistic comment outstanding but I don't want to hold up merge on it as I'm looking at it now and I think it's more a suggestion than a requirement

@eileenmcnaughton eileenmcnaughton merged commit 581e7ba into civicrm:master Nov 27, 2017
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21456 : Relationship end date not set when creating resolved cases
@jitendrapurohit jitendrapurohit deleted the CRM-21456 branch March 14, 2018 04:16
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.

4 participants