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

Customvalue ID is ignored #12606

Merged
merged 1 commit into from
Aug 1, 2018
Merged

Conversation

monishdeb
Copy link
Member

Overview

Earlier the ID of custom value table's record was not considered and thus it doesn't allow to update a custom table value record.

Before

Doesn't update the custom table value

After

Update the custom table value

@civibot
Copy link

civibot bot commented Jul 31, 2018

(Standard links)

@colemanw
Copy link
Member

colemanw commented Aug 1, 2018

@monishdeb a few lines down from your patch I see

if ($fieldValue['id'] > 0) {
  $cvParam['id'] = $fieldValue['id'];
}

So perhaps there is an alternate way of passing in the id to this function from api4 which you could use instead that would not require this PR?

@monishdeb
Copy link
Member Author

@colemanw yes I saw that earlier, but found the spot how the $fieldValue['id'] is assigned, because in the query above https://github.com/civicrm/civicrm-core/pull/12606/files#diff-927e742818deb9c89a00d2528e360bf0R577 there is no indication that id is retrieved nor it searches $params.

@colemanw
Copy link
Member

colemanw commented Aug 1, 2018

This passes tests and fixes a failing test in Api4.

@colemanw colemanw merged commit a1dbccf into civicrm:master Aug 1, 2018
@monishdeb monishdeb deleted the custom-value-update branch August 1, 2018 18:00
@monishdeb
Copy link
Member Author

Thanks @colemanw

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