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

[REF+test] clean up code for getting labels for merge screen, stdise #14260

Merged
merged 2 commits into from
May 19, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented May 16, 2019

Overview

Primarily a code clean up & test add this has the side effect of rendering labels for preferred language & the greeting IDs - which seems to me like a positive side effect

Before

before

After

after

Technical Details

The whole getSpecialValues function was a convoluted way of

  1. getting labels for 2 fields - preferred communication method & communication style
  2. serializing the value for preferred communication method

It was deeply confusing & hence had to be cleaned up

Comments

@JKingsnorth

@civibot
Copy link

civibot bot commented May 16, 2019

(Standard links)

@civibot civibot bot added the master label May 16, 2019
@eileenmcnaughton eileenmcnaughton changed the title Spec [REF+test] clean up code for getting labels for merge screen, stdise May 16, 2019
@JKingsnorth
Copy link
Contributor

I will try to QA this, but it looks good from the screenshots. The 'addressee ID' thing is a bit weird; but 'better' than just displaying a meaningless ID I suppose.

@JKingsnorth
Copy link
Contributor

JKingsnorth commented May 17, 2019

Yes, the changes look good to me. I tested the display, and the merging, and it worked as expected.

However - I did come across a new bug while testing this:
https://lab.civicrm.org/dev/core/issues/970

But it is not a regression, so I recommend merging this PR providing the tests pass (I did not test the tests).

@@ -1092,14 +1090,22 @@ public static function getRowsElementsAndInfo($mainId, $otherId, $checkPermissio
// CRM-15681 don't display sub-types in UI
continue;
}
foreach (['main', 'other'] as $moniker) {
$contact = &$$moniker;
Copy link
Contributor

Choose a reason for hiding this comment

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

Hooray! It's gone!

@colemanw
Copy link
Member

@eileenmcnaughton this needs rebasing.

…data

This is preliminary to a code cleanup.

m
…splay

This code was really confusing - all that 'special values' stuff. Turned out it
didn't have to be....
@eileenmcnaughton
Copy link
Contributor Author

@colemanw done

@eileenmcnaughton
Copy link
Contributor Author

test this please

@seamuslee001
Copy link
Contributor

I'm going to merge based on @JKingsnorth 's review but @eileenmcnaughton i assume you will want to follow up on that other issue @JKingsnorth has reported

@seamuslee001 seamuslee001 merged commit 0896a16 into civicrm:master May 19, 2019
@eileenmcnaughton eileenmcnaughton deleted the spec branch May 19, 2019 22:59
@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 dying to :-)

But yeah it's on my radar

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.

4 participants