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

dev/core#812 - Fix null display of contribution row on … #13881

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

jitendrapurohit
Copy link
Contributor

…y page

Overview

RC fix for #13868. Null row is displayed on contact summary page if contact has 0 contribution.

Before

Screenshot from dmaster -

image

If any of the link is clicked on the row, it results into an error -

image

After

Fixed.

image

Technical Details

We removed the unnecessary financial type join from the contribution table in #13720

Before the above fix, the query included the financial type which unintentionally avoided the null row to be returned as output -

SELECT  civicrm_contribution.id, .......... 
FROM civicrm_contact contact_a 
    LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id  
    INNER JOIN civicrm_financial_type ON civicrm_contribution.financial_type_id = civicrm_financial_type.id  
    LEFT  JOIN civicrm_contribution_product ON civicrm_contribution_product.contribution_id = civicrm_contribution.id 
    LEFT  JOIN civicrm_product ON civicrm_contribution_product.product_id =civicrm_product.id 
WHERE  ( contact_a.id = '202' )  AND (contact_a.is_deleted = 0)   
  GROUP BY civicrm_contribution.id  ORDER BY `receive_date` desc, `contact_a`.`id`  LIMIT 0, 50 

After the removal of financial type join, the query is -

SELECT  civicrm_contribution.id, ......
FROM civicrm_contact contact_a 
    LEFT JOIN civicrm_contribution   ON civicrm_contribution.contact_id = contact_a.id
WHERE  ( contact_a.id = '202' )  AND (contact_a.is_deleted = 0)   
GROUP BY civicrm_contribution.id  ORDER BY `receive_date` desc, `contact_a`.`id`  
LIMIT 0, 50 

As it is a left join and no other field, the contact null row gets returned and is displayed on the contribution tab. @eileenmcnaughton

Comments

Gitlab - https://lab.civicrm.org/dev/core/issues/812

@civibot
Copy link

civibot bot commented Mar 22, 2019

(Standard links)

@civibot civibot bot added the 5.12 label Mar 22, 2019
@jitendrapurohit jitendrapurohit changed the title dev/core#812 - RC equivalent for null display of contribution row on … dev/core#812 - Fix null display of contribution row on … Mar 22, 2019
@eileenmcnaughton
Copy link
Contributor

Cool this will clear out the regression column! (& we are back under 100 prs - although I'm sure a lot are not review-ready)

@eileenmcnaughton eileenmcnaughton merged commit 5fdcfcc into civicrm:5.12 Mar 22, 2019
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