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 enotice when updating a custom group with is_multiple = 1 #12243

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

When updating a group with is_multiple = 1 there should be no change unless ['is_multiple']
is set but existing code is causing an e-notice in that case

Before

E-notice, new test fails

After

no e-notice, test passes

Technical Details

Comments

@michaelmcandrew perhaps you could look at this - kinda relates to yours

When updating a group with is_multiple = 1 there should be no change unless ['is_multiple']
is set but existing code is pretty confusing.
@michaelmcandrew
Copy link
Contributor

michaelmcandrew commented Jun 1, 2018

hey @eileenmcnaughton - yes - very simliar. the new logic makes sense to me. I did some manual testing to get my head around it. works as I would expect so good to merge.

aside: not sure why we (before and now) we are entangling the need for an index update with the table name ($tableNameNeedingIndexUpdate) and not just using a boolean for $needsIndexUpdate and getting the table name from somewhere else. I would have thought that tableName should be disentangled from all those conditionals, but I am guessing you wanted to leave that part of the code alone (and I am resisting the temptation to increase the scope of your PR).

@@ -300,11 +300,19 @@ public function testCustomGroupCreateGroup() {
'help_post' => 'This is Post Help For Test Group 8',
);

$customGroup = $this->callAPISuccess('custom_group', 'create', $params);
$customGroup = $this->callAPISuccess('CustomGroup', 'create', $params);
Copy link
Member

Choose a reason for hiding this comment

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

These ought to be equivalent. Any reason why this change was made?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding is that our preferred format for the entity is the camel case so it was for that reason

@seamuslee001
Copy link
Contributor

(CiviCRM Review Template WORD-1.1)

@seamuslee001 seamuslee001 merged commit 0f48b98 into civicrm:master Jun 5, 2018
@eileenmcnaughton eileenmcnaughton deleted the custom_group branch June 5, 2018 05:54
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.

5 participants