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/financial#199 - Add failing test to demonstrate the problem #23774

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

demeritcowboy
Copy link
Contributor

@demeritcowboy demeritcowboy commented Jun 12, 2022

Overview

Failing test for https://lab.civicrm.org/dev/financial/-/issues/199: Additional Details section when editing recurring contributions won't load.

Before

Won't load - spinning icon.

After

Still doesn't, but adds proof. This should output:

CRM_Contribute_Form_UpdateSubscriptionTest::testAdditionalDetails
Exception: PEAR_Exception: "QuickForm Error: nonexistent html element"
 * ERROR TYPE: HTML_QuickForm_Error
 * ERROR CODE: -3
 * ERROR MESSAGE: QuickForm Error: nonexistent html element
 * ERROR MODE: 16
 * ERROR USERINFO: Element 'contribution_status_id' does not exist in HTML_QuickForm::getElement()

Technical Details

There is no contribution_status_id, so trying to freeze() it throws an error. A simple fix would be to check elementExists() first, but feels awkward.

Comments

In real life recurring creates a mirror contribution record with a status of "Template". Updated the trait to do that.

There's also a problem with status_id when you save. Haven't addressed yet.

@civibot civibot bot added the master label Jun 12, 2022
@civibot
Copy link

civibot bot commented Jun 12, 2022

(Standard links)

@eileenmcnaughton
Copy link
Contributor

Just noting that I think we should unfreeze the amount on the edit-recurring for single line items (restore functionality) but we need to make it so the template contribution is updated when the civicrm_contriution_recur.amount is altered (the api/bao should reject changes if more than one line item)

@demeritcowboy
Copy link
Contributor Author

At the moment I'm just trying to deal with errors for the status_id field. I'm going to convert this into a failing test.

@demeritcowboy demeritcowboy changed the title [WIP] dev/financial#199 - Add failing test to demonstrate the problem Jun 13, 2022
@mattwire
Copy link
Contributor

Fix here #23786

@eileenmcnaughton
Copy link
Contributor

test this please

@seamuslee001 seamuslee001 merged commit 8149bb4 into civicrm:master Jun 14, 2022
@demeritcowboy demeritcowboy deleted the recur-curious branch June 15, 2022 12:57
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.

4 participants