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] Minor code cleanup on the setting of contact greetings. #15949

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code tidy up

Before

A bunch of 3 line code calls

After

Replaced with a bunch of one line calls. Also an IF removed - see below

Technical Details

I'm trying to review #15725 but through no fault of that PR it hits
on one of the parts of the Export code that I still find unreadable :-( This is a further readability fix & it
starts to point me to how to get past the underlying WTF about this code.

Note that I removed the IF around sharedAddress. From Monish's PR I found out that we have a
fairly long-standing regression where the sharedAddress code doesn't actually work :-( so
I'm comfortable this won't break anything :-). We also have good test cover on this chunk from
probably around when the shared address part got broken....

Looking in the UI there is no implication that the greeting for a shared address would display differently -
which is the only explanation I can think of for different handling here. Of course until we
remove the later IF the shared address would do things differently - erm if it worked.

ALl of which is a long way of saying the removal of the IF won't change anything

Comments

@civibot
Copy link

civibot bot commented Nov 24, 2019

(Standard links)

@civibot civibot bot added the master label Nov 24, 2019
I'm trying to review civicrm#15725 but through no fault of that PR it hits
on one of the parts of the Export code that I still find unreadable :-( This is a further readability fix & it
starts to point me to how to get past the underlying WTF about this code.

Note that I removed the IF around sharedAddress. From Monish's PR I found out that we have a
fairly long-standing regression where the sharedAddress code doesn't actually work :-( so
I'm comfortable this won't break anything :-). We also have good test cover on this chunk from
probably around when the shared address part got broken....

Looking in the UI there is no implication that the greeting for a shared address would display differently -
which is the only explanation I can think of for different handling here. Of course until we
remove the later IF the shared address would do things differently - erm if it worked.

ALl of which is a long way of saying the removal of the IF won't change anything
@seamuslee001
Copy link
Contributor

Added Merge on pass, reviewed the code it makes sense to me. Agree with the explanation provided on the removal of the if

@eileenmcnaughton
Copy link
Contributor Author

unrelated fail - merging

@eileenmcnaughton eileenmcnaughton merged commit 745a16c into civicrm:master Nov 25, 2019
@eileenmcnaughton eileenmcnaughton deleted the export_ref branch November 25, 2019 01:45
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Nov 25, 2019
This is a follow on from civicrm#15949

This doesn't make any change - it just improves legibility
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Nov 25, 2019
This is a follow on from civicrm#15949

This doesn't make any change - it just improves legibility
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.

2 participants