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

dev#2861: Prevent duplicate names in mailing labels #20783

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

monishdeb
Copy link
Member

Overview

Steps to replicate:

  1. Go to CiviCRM >> Administration Console >> Address Setting
  2. Update the mailing format to
{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}
{contact.organization_name}
{contact.street_address}
{contact.supplemental_address_1}
{contact.supplemental_address_2}
{contact.supplemental_address_3}
{contact.city}{, }{contact.state_province}{ }{contact.postal_code}
{contact.country}
  1. Go to Advance search and search for contacts based on any criteria (make sure to include organisation and household in the result)
  2. Print mailing labels

https://lab.civicrm.org/dev/core/-/issues/2681

Before

Screenshot 2021-07-06 at 8 56 38 PM

After

Screenshot 2021-07-06 at 8 56 20 PM

Comments

ping @eileenmcnaughton @colemanw

@civibot
Copy link

civibot bot commented Jul 6, 2021

(Standard links)

@civibot civibot bot added the master label Jul 6, 2021
@colemanw
Copy link
Member

colemanw commented Jul 6, 2021

Looking back through the svn history, the change dates to civicrm/civicrm-svn@6a7f80f#diff-3e6f2e4d6e151f1ade1f80e3463b12e7804643b50a8556e3334ca3f7ac669ba3

Issue: https://issues.civicrm.org/jira/browse/CRM-4575

I'm not clear from the issue description why it was implemented that way, but I certainly think the change in this PR is more correct.

Adding merge-ready tag in case others have input before merging.

@colemanw colemanw added the merge ready PR will be merged after a few days if there are no objections label Jul 6, 2021
@eileenmcnaughton
Copy link
Contributor

I would assume that the reason is because if it is a household label the 'right' field for that household is 'display_name'

However, I suspect in practice the household_name is a drop in replacement for display_name for households and likewise for orgs with organization_name

I tested labels for all 3 types and they seem ok

image

@eileenmcnaughton eileenmcnaughton merged commit 0446864 into civicrm:master Jul 7, 2021
@monishdeb monishdeb deleted the issue_2681 branch July 7, 2021 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants