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#5584 Fix soft credit default setting & copy down #31446

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Nov 7, 2024

Overview

this fixes a couple of issues with the soft credit type field in the batch data entry screen

Before

  1. back in 2020 the soft_credit_type field was accidentally changed from optional to required as part of an large change which accidentally dropped off a parameter in this line - meaning that $extra is being passed in as $required - this adds the extra $required = FALSE to revert that

  2. in addition setting the soft credit contact was causing the soft credit type to be changed to the default value even when it had already been intentionally been set by the user to something else

  3. the copy functionality was missing for the soft credit type field
    Uploading peek-batch-before.gif…

  4. deprecation warning
    image

note that another notice warning fix on this screen was merged to core today - if you see a notice on size you may not have that patch

After

batch-after

Technical Details

The copy functionality was removed in the course of https://issues.civicrm.org/jira/browse/CRM-12653 but it is not clear that it was intentional - I commented on possible reasons in-code for the fields for the soft credit contact & soft credit amount to have been excluded from the copy down - basically either because of the proximity of the too-hard-basket or because there was an anticipation of new functionality that never happened.

Comments

Copy link

civibot bot commented Nov 7, 2024

🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷

Introduction for new contributors...
  • If this is your first PR, an admin will greenlight automated testing with the command ok to test or add to whitelist.
  • A series of tests will automatically run. You can see the results at the bottom of this page (if there are any problems, it will include a link to see what went wrong).
  • A demo site will be built where anyone can try out a version of CiviCRM that includes your changes.
  • If this process needs to be repeated, an admin will issue the command test this please to rerun tests and build a new demo site.
  • Before this PR can be merged, it needs to be reviewed. Please keep in mind that reviewers are volunteers, and their response time can vary from a few hours to a few weeks depending on their availability and their knowledge of this particular part of CiviCRM.
  • A great way to speed up this process is to "trade reviews" with someone - find an open PR that you feel able to review, and leave a comment like "I'm reviewing this now, could you please review mine?" (include a link to yours). You don't have to wait for a response to get started (and you don't have to stop at one!) the more you review, the faster this process goes for everyone 😄
  • To ensure that you are credited properly in the final release notes, please add yourself to contributor-key.yml
  • For more information about contributing, see CONTRIBUTING.md.
Quick links for reviewers...

➡️ Online demo of this PR 🔗

@civibot civibot bot added the master label Nov 7, 2024
Copy link

civibot bot commented Nov 7, 2024

The issue associated with the Pull Request can be viewed at https://lab.civicrm.org/dev/core/-/issues/5584

wmfgerrit pushed a commit to wikimedia/wikimedia-fundraising-crm that referenced this pull request Nov 8, 2024
Port civicrm/civicrm-core#31446

This is the screen accessed at
https://wmff.localhost:32353/civicrm/batch?reset=1

Bug: T371541
Change-Id: I5a1b0233586f1076272479886ce4ec759670bb07
@mlutfy
Copy link
Member

mlutfy commented Nov 14, 2024

jenkins, test this please

@demeritcowboy demeritcowboy added the merge ready PR will be merged after a few days if there are no objections label Nov 16, 2024
@demeritcowboy
Copy link
Contributor

This seems fine there's just some inconsistency in how soft-credit type works and I'm not sure what it's supposed to be so have put merge-ready:

  • On a regular contribution I can leave it blank and it will happily make the soft-credit with no type (maybe this is a bug?)
  • Here, if I try to blank it out it appears to let me, but the soft-credit gets created with Solicited type.

@eileenmcnaughton
Copy link
Contributor Author

@demeritcowboy from my testing it seemed like you had to enter a soft credit amount to have a soft credit created - were you seeing it create a soft credit even when the soft credit amount was not populated?

@demeritcowboy
Copy link
Contributor

No it's that assuming the intent is to allow a soft credit without a type (which would be consistent with the regular contribution form), then you can't do that with this PR because even if you blank out the type field, it creates it with solicited type.

i.e. fill out a batch entry and filling in the soft credit fields, but make the soft credit type blank. When you save, the soft credit has solicited type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants