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-21114: copy assignees on file on case #10912

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

lcdservices
Copy link
Contributor

@lcdservices lcdservices commented Aug 28, 2017

Overview

When filing an activity on a case, also copy the original assignees.

Before

File on case would ignore existing activity assignees.

After

Assignees are now copied to the new activity in the case record.


@elisseck
Copy link
Contributor

Jenkins retest this please

@elisseck
Copy link
Contributor

Just tested this to confirm and saw no errors or red flags here. The previous functionality of setting to blank array doesn't make a lot of sense to me, either.

Before - Both "move to case" from the "manage case" window and "file on case" from the "activities" tab caused the assignee to be dropped off of the activity.

After - The assignee is transferred correctly when the activity is filed on a case or moved between cases.

@colemanw can you take a look at merge please?

@colemanw colemanw merged commit 3c0059d into civicrm:master Sep 27, 2017
@mickadoo
Copy link
Contributor

@colemanw @elisseck I know I was probably butting in where I didn't know what was going on, but it would be nice to at least have open reviews answered and approved before merging.

@lcdservices
Copy link
Contributor Author

@mickadoo what do you mean by "open reviews answered" -- I don't see any comments or unanswered questions on the PR, aside from the test comments from @elisseck

@mickadoo
Copy link
Contributor

Ah ok, no worries. I just left a comment that I can see here but maybe because I didn't finish my review it's not visible or something. Like I said, it's nothing too important, but just was surprised to see the merge notification.

@lcdservices
Copy link
Contributor Author

@mickadoo yeah... I don't see anything there. It must not be saved and exposed to others unless you finish the review.

Copy link
Contributor

@mickadoo mickadoo left a comment

Choose a reason for hiding this comment

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

Too late to the party, but I just had a question about the arguments passed into one of the methods.

// typically this will be empty, since assignees on another case may be completely different
$assigneeContacts = array();
//CRM-21114 retrieve assignee contacts from original case; allow overriding from params
$assigneeContacts = CRM_Activity_BAO_ActivityContact::retrieveContactIdsByActivityId($params['activityID'], $assigneeID);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I follow here, from the method signature the second parameter is $recordTypeId, but you're passing in $assigneeID

Aside from that, the original comment suggested that leaving $assigneeContacts as empty was intentional, do you think copying them over will be expected behaviour for most cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$assigneeID is the record type id -- see line 344. Not the greatest var name, but it was already there and referenced elsewhere in the function, so I didn't change it. Re: the original comment -- that was mentioned in the Jira ticket and @colemanw agreed we should copy the assignees. I think in normal usage, people would expect the assignee to be moved with the activity.

@mickadoo
Copy link
Contributor

@lcdservices I found some relevant info

Before you submit your review, your line comments are pending and only visible to you.

I'm sorry! I thought I'd commented and just nobody had replied 😄

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.

5 participants