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

CRM-21791 Use name for comparison instead of label (alternative) #11878

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Mar 26, 2018

Overview

This is an alternative to #11710 which converts everything in the class.

Code needs testing @samuelsov does this work?


@@ -117,7 +117,7 @@ public function buildQuickForm() {
$batchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id');

// unset exported status
$exportedStatusId = CRM_Utils_Array::key('Exported', $batchStatus);
$exportedStatusId = CRM_Core_PseudoConstant::getKey('CRM_Batch_DAO_Batch', 'status_id', 'Exported');
Copy link
Contributor

Choose a reason for hiding this comment

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

As a general practice we should use 'BAO' rather than 'DAO' in case there is an override (you don't need to change the PR just for this but if you are changing the PR BAO is preferred)

@eileenmcnaughton
Copy link
Contributor

test this please

@eileenmcnaughton
Copy link
Contributor

Changes look good - seems mergeable pending feedback from @samuelsov

@mattwire mattwire force-pushed the CRM-21791_financial_batch_pseudoconstant branch from 95297cc to b9a4cb6 Compare March 26, 2018 20:42
@samuelsov
Copy link
Contributor

Ok thanks, will test this today.

@samuelsov
Copy link
Contributor

Yes, it solves the problem, thanks.
I think we can merge.

@eileenmcnaughton eileenmcnaughton merged commit c2bf40c into civicrm:master Mar 30, 2018
@mattwire mattwire deleted the CRM-21791_financial_batch_pseudoconstant branch September 25, 2018 11:04
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