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

Display only own assignees contact(s) on batch activity form #15035

Merged
merged 1 commit into from
Aug 15, 2019

Conversation

scardinius
Copy link
Contributor

Overview

Activity profile always displays Added By, With Contact and Assigned to fields.
Assigned to contains own contact and contacts for previous processed activities.
https://lab.civicrm.org/dev/core/issues/1185

Before

1st -> only own contact(s)
2nd -> own contact(s) and previous contacts (from 1st)
3rd -> own contact(s) and previous contacts (from 1st and 2nd)
4th -> ...

After

1st -> only own contact(s)
2nd -> own contact(s)
3rd -> own contact(s)
4th -> ...

Technical Details

Simple reset $assigneeContact array before next activity

Comments

It's curious that such simple bug exists

@civibot
Copy link

civibot bot commented Aug 14, 2019

(Standard links)

@eileenmcnaughton
Copy link
Contributor

Makes sense - just needs someone to r-run it

@demeritcowboy
Copy link
Contributor

  • General standards
    • [r-explain] PASS
    • [r-user] PASS
    • [r-doc] PASS
    • [r-run] PASS
      • I got Notice: Array to string conversion in HTML_QuickForm_select->toHtml() (line 496 of /.../web/sites/all/modules/civicrm/packages/HTML/QuickForm/select.php) when you actually save the batch update, but that happens before the patch too and seems like a separate pre-existing problem.
  • Developer standards
    • [r-tech] PASS
    • [r-code] PASS
    • [r-maint] PASS
    • [r-test] PASS

@eileenmcnaughton
Copy link
Contributor

Thanks @demeritcowboy & thanks @scardinius - merging

@eileenmcnaughton eileenmcnaughton merged commit 4c690aa into civicrm:master Aug 15, 2019
@demeritcowboy
Copy link
Contributor

D'oh just noticed something. It causes it to only show one of the With Contacts instead of all of them if there are multiple. Not sure if that's a big problem but is a change. The original purpose of showing these seems to have been to give some guidance as to which activity you are editing in the batch, so it still does that.

@eileenmcnaughton
Copy link
Contributor

hmm the fact no-one spotted the leakage before suggests no-one is looking too closely...

@eileenmcnaughton
Copy link
Contributor

the code suggests that would not be an issue


        foreach ($assignee as $values) {
          $assigneeContact[] = CRM_Contact_BAO_Contact::displayName($values);
        }

@demeritcowboy
Copy link
Contributor

And yet I see the difference on the batch update screen, so I dunno. But yeah I'm not sure it's worth tracing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants