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

Don't duplicate activity when filing on case #12620

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Aug 3, 2018

Overview

When filing an activity on a case via the "File On Case" link on the activity tab/activity detail view an odd set of parameters is set which results in two separate activities - one which is on the case and one which is not.

Before

  • original_id is not set on new activity.
  • is_current_revision is not set to FALSE on original activity.

localhost_8000_civicrm_activity_search__qf_search_display true qfkey 30a4eae1de7276c7c6d8ff53f91bfe6e_7178

After

  • original_id is set on new activity.
  • is_current_revision is set to FALSE on original activity.

localhost_8000_civicrm_activity_search__qf_search_display true qfkey 30a4eae1de7276c7c6d8ff53f91bfe6e_7178 1

Technical Details

AFTER is consistent with how case activities are normally handled, ie activity is duplicated, is_current_revision set to false on old activity and original_id set on new activity. UI (searches etc) expect this to be the case.

@civibot
Copy link

civibot bot commented Aug 3, 2018

(Standard links)

@mattwire mattwire changed the title Set activity params correctly when filing an activity on case Don't duplicate activity when filing on case Aug 3, 2018
@mattwire
Copy link
Contributor Author

mattwire commented Aug 3, 2018

@colemanw Is this something you are able to comment on?

@colemanw
Copy link
Member

colemanw commented Aug 3, 2018

Your code looks correct to me. In general I want to move away from the whole "original id" and "is current revision" gunk because it's a really bad logging system and since that was made for civicase we now have a much better, trigger-based logging system sitewide (not just for case activities). But while we still have that cruft we should at least not allow it to break things.
I haven't had a chance to r-run this but other than that 👍

@colemanw
Copy link
Member

colemanw commented Aug 6, 2018

I've r-run it now and it seems to be working correctly. I agree that duplicating the activity was not the correct behavior before.

@colemanw colemanw merged commit 1eaa530 into civicrm:master Aug 6, 2018
@mattwire mattwire deleted the fileoncase_activityparams branch September 25, 2018 10:58
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