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

Fix activity.case_id token to always display the first case ID #16208

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Jan 4, 2020

Overview

activity.case_id is always an array because it is possible to have an activity linked to multiple cases.

Before

{activity.case_id} token displays nothing because it is an array.

After

We take the first case_id from the array and display it as {activity.case_id}

Technical Details

Comments

@civibot
Copy link

civibot bot commented Jan 4, 2020

(Standard links)

@civibot civibot bot added the master label Jan 4, 2020
@demeritcowboy
Copy link
Contributor

  • General standards
    • [r-explain] PASS
      • Can reproduce and I get the following when moving on the next page: Warning: htmlentities() expects parameter 1 to be string, array given in Civi\Token\TokenRow->fill() (line 236 of blah/Civi/Token/TokenRow.php).
    • [r-user] PASS
    • [r-doc] PASS
    • [r-run] PASS Works.
  • Developer standards
    • [r-tech] PASS
      • I have some stream-of-consciousness thoughts which I'll put in a lab ticket but which shouldn't hold up this PR. I think it would also apply to the other tokens PR WIP Activity pdf 71 rebased #16200 because it's the same question of how to deal with a multivalued field like activity.target_contact in tokens.
    • [r-code] PASS
    • [r-maint] PASS
    • [r-test] PASS

@demeritcowboy
Copy link
Contributor

For further discussion ticket: https://lab.civicrm.org/dev/core/issues/1516

@seamuslee001
Copy link
Contributor

Merging based on @demeritcowboy 's review

@seamuslee001 seamuslee001 merged commit af1fcb5 into civicrm:master Jan 9, 2020
@mattwire mattwire deleted the activitytokensfixcaseid branch February 1, 2020 20:34
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