Development issueshttps://lab.civicrm.org/groups/dev/-/issues2022-10-25T11:50:42Zhttps://lab.civicrm.org/dev/core/-/issues/3890Proposal: Rebuild smart group cache for specific smart groups included in mai...2022-10-25T11:50:42ZlarsssandergreenProposal: Rebuild smart group cache for specific smart groups included in mailing at scheduling timeIdeally, the recipients of a mailing with smart groups should be as up to date as possible when the mailing is scheduled. Currently, a cached version of the smart group is used to build the list of recipients, leading to potentially out ...Ideally, the recipients of a mailing with smart groups should be as up to date as possible when the mailing is scheduled. Currently, a cached version of the smart group is used to build the list of recipients, leading to potentially out of date recipients.
Can we just rebuild the smart group cache for the specific smart groups included in a mailing at scheduling time? Is there significant risk to doing so?
@eileen, I understand you're the expert on this.https://lab.civicrm.org/dev/core/-/issues/3889API4 dates entered without time can give unexpected results2022-10-25T11:50:59ZlarsssandergreenAPI4 dates entered without time can give unexpected resultsFor a datetime field, any date in an API call is converted to a datetime (midnight on the date in question). This can give unexpected results for gets, especially using Search Kit or Form Builder, where users probably aren't thinking abo...For a datetime field, any date in an API call is converted to a datetime (midnight on the date in question). This can give unexpected results for gets, especially using Search Kit or Form Builder, where users probably aren't thinking about dates versus datetimes. These results also aren't consistent with what you get from Advanced Search or other searches.
For example, searching for a contribution with receive_date = 2022-01-01 does not return all contributions received on that date. It only returns contributions received at exactly midnight, i.e. with receive_date = 20220101000000.
Similar issues exist for other operators, like !=, > (will include the date), <= (won't include the date), BETWEEN and NOT BETWEEN (will include the from date, but not the to date), and IN and NOT IN.
The simplest solution would be to put a SQL DATEFORMAT() around the database date field when the date does not include a time and use a Ymd format. This wouldn't work for BETWEEN or IN when one date includes a time and the other doesn't though.
Or if we don't want to change the query, another approach would be to check absolute dates entered into the API to see if they include a time component or not.
- If they include a time, proceed as usual.
- If they don't include times, for all operators except = and !=/<>, set the time component or components depending on the operator (e.g. for BETWEEN set 000000 for the from date, 235959 for the to date).
- For = or !=, switch the operator to BETWEEN or NOT BETWEEN, set the from date to 000000 and the to date to 235959.
- For IN and NOT IN, I'm not sure there's an easy solution in this case. We'd have to convert that to a series of BETWEENs and that's going to be difficult. Is there a good way to warn users that this won't work?
- Not sure what the other operators are supposed to do with dates.
But maybe there's a more elegant solution to this problem. Hoping to get some expert feedback before starting any work on this, since date stuff can be such a quagmire.https://lab.civicrm.org/dev/core/-/issues/3886api3 explorer giving strange advice for customfield.create2022-10-10T10:01:22ZDaveDapi3 explorer giving strange advice for customfield.createDoing a get gives "String" and "Text", which matches my memory and v4 explorer. But I'm not sure when this changed.
![Untitled3](/uploads/a9e8e188fec92c45f2e1dd8aad3e9bef/Untitled3.png)Doing a get gives "String" and "Text", which matches my memory and v4 explorer. But I'm not sure when this changed.
![Untitled3](/uploads/a9e8e188fec92c45f2e1dd8aad3e9bef/Untitled3.png)https://lab.civicrm.org/dev/core/-/issues/3883Group - remove contacts action removes contacts who are not in group and repo...2022-10-25T11:51:49ZlarsssandergreenGroup - remove contacts action removes contacts who are not in group and reports incorrect numbers removedOverview
----------------------------------------
[removeContactsFromGroup](https://github.com/civicrm/civicrm-core/blob/843958bc0022cec4145c8796ae49ccb2fd9d3c28/CRM/Contact/BAO/GroupContact.php#L156) doesn't check if a contact is in a g...Overview
----------------------------------------
[removeContactsFromGroup](https://github.com/civicrm/civicrm-core/blob/843958bc0022cec4145c8796ae49ccb2fd9d3c28/CRM/Contact/BAO/GroupContact.php#L156) doesn't check if a contact is in a group before removing or deleting them, resulting in some strange behaviour. The reported counts shown to the user of contacts removed are also incorrect. Subscription history is set when it doesn't need to be.
This function is also used by Api3 and for unsubscribes.
Current behaviour
----------------------------------------
If we're removing, no matter what the current status of the contact is in the group (Added, Pending, Removed or none at all), the status is set to Removed. If a contact had no relationship to the group at all, they will be set to Removed (and show on the Contact Groups tab as removed, which is confusing for the user as they were never in the group). In all cases, subscription history is added with status Removed.
Counts of contacts removed reported to user are incorrect.
If we're deleting, the row is simply deleted from the table. In all cases, subscription history is added with status Deleted.
Expected behaviour
----------------------------------------
If we're removing:
- If a contact is currently Added or Pending, it is set to Removed and subscription history is added.
- If a contact is Removed or has no group status, nothing happens.
This is somewhat confusing for smart groups. If a contact is not in a smart group because they don't meet the smart group criteria, do we want to set them to Removed, so they are effectively pre-removed if they later meet the smart group criteria? I think we do want this to happen for mailing groups because this function is used for unsubscribes. We don't want a contact to later become part of a smart group that was used for a mailing that they unsubscribed from, so I think we do want to set status to Removed no matter what.
Counts reported to user should also be correct based on what actually happened.
If we're deleting:
- If a contact is currently Added, Pending or Removed, it is deleted from the table and subscription history is added. For smart groups, this resets the contact to being a smart member of the group or not based on the smart group criteria.
- If a contact has no group status, nothing happens.
Fix
----------------------------------------
If this makes sense, I'll submit a PR.
Confusingly, removeContactsFromGroup is also used to _add_ contacts to a group [here.](https://github.com/civicrm/civicrm-core/blob/843958bc0022cec4145c8796ae49ccb2fd9d3c28/CRM/Contact/Page/View/GroupContact.php#L173) I will change that to use addContactsToGroup for Added or Pending. This will result in a change to the op for the hooks though (from `CRM_Utils_Hook::pre('edit', 'GroupContact'...` to `CRM_Utils_Hook::pre('create', 'GroupContact'...`. [The docs](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_pre/) say create is correct for a contact being added to a group, so it appears this is not correct as it stands. Definitely would value an expert opinion on this aspect.https://lab.civicrm.org/dev/core/-/issues/3882SearchKit - distinct values should be sorted by id2022-10-25T11:52:13ZvitiusSearchKit - distinct values should be sorted by idWhen we have List of contact name and dont use distinct. On output we get sorted list of names on contact id. And when we want have hyperlinks on contacts name, that works perfectly. But when we use distinct function, on output we get un...When we have List of contact name and dont use distinct. On output we get sorted list of names on contact id. And when we want have hyperlinks on contacts name, that works perfectly. But when we use distinct function, on output we get unsorted list of names. But links on contacts is sorted by contact id. That causes missmatch. First of display name have link to lowest contact id and last of display name have link to highest contact id.
I tried this on version 5.51.1 and 5.55.alpha1. And I tried this on case clients (you need enable multiple case clients) like you can see on images bellow. Also I tried this on event participants, where I use aggregation on event id and display participants names. On both distinct causes bad hyper links.
![image](/uploads/7fd977598194996923ddf3e1a698b261/image.png)
![image](/uploads/ac8b4684a84cc8da39b7179eff4ee749/image.png)https://lab.civicrm.org/dev/core/-/issues/3881Edit fields for invoicing information2022-10-25T11:52:40Zthoni56Edit fields for invoicing informationOverview
----------------------------------------
The form fields for invoicing information (in CiviEvent) seems to be hardcoded. E.g. it lacks company name and email. It does not seem possible to change or amend these fields.
Example u...Overview
----------------------------------------
The form fields for invoicing information (in CiviEvent) seems to be hardcoded. E.g. it lacks company name and email. It does not seem possible to change or amend these fields.
Example use-case
----------------------------------------
1. Create an event and enable web registrations
1. Make invoicing mandatory
2. Make a registration and notice what the only available fields are
Current behaviour
----------------------------------------
Hard coded fields
Proposed behaviour
----------------------------------------
Possiblity to use a profile, or custom form.
Comments
----------------------------------------
There is a StackExchange question around this: https://civicrm.stackexchange.com/questions/42202/how-can-i-add-company-to-billing-pay-later-fields but the proposed "solution" is hard and really not a solution.https://lab.civicrm.org/dev/core/-/issues/3880Include displays when cloning searchkit custom searches2022-10-20T07:15:21ZBradley TaylorInclude displays when cloning searchkit custom searchesOn SearchKit it is possible to select "Clone" to create a copy of a saved search which can save a lot of time.
This does not appear to clone any displays (tables, lists, grids). These displays can also take a lot of time to setup and so...On SearchKit it is possible to select "Clone" to create a copy of a saved search which can save a lot of time.
This does not appear to clone any displays (tables, lists, grids). These displays can also take a lot of time to setup and so I believe the ability to include these in the cloned search would be a great feature.
The use case where I came across this was where a client wanted 3 custom search displays, filtered to all events, events from this calendar year, events from past calendar year. An alternative solution would be to allow individual displays to be filtered differently, but associated with a single searchkit search.https://lab.civicrm.org/dev/core/-/issues/3878SearchKit: Add ability to search and filter by active periods2023-02-27T22:02:08ZfrancescbassasSearchKit: Add ability to search and filter by active periodsOverview
----------------------------------------
Some entities (Relationships, Memberships, Cases, Events, Recurring Contributions) may be defined by a start date and end date that indirectly define a period in which the entity is activ...Overview
----------------------------------------
Some entities (Relationships, Memberships, Cases, Events, Recurring Contributions) may be defined by a start date and end date that indirectly define a period in which the entity is active or not.
This is a proposal to enable the possibility to search for entities active during a specific period via SearchKit and also filter results through related SearchKit Afforms.
Example use-case
----------------------------------------
1. **Relationships:** Search for active volunteers on a specific year
1. **Cases:** Get a pivot report with active cases per week
1. **Events:** Count number of active events on last year
1. **Memberships:** List active members per month
1. **Recurring contributions:** Get a pivot report with the active recurring contributions per month
Current behaviour
----------------------------------------
Currently, search for active relationships it’s only available through Advanced Search and Relationships Report, but it’s not possible to do this search via SearchKit.
![advanced-search](/uploads/dbd57f4abd494fe4225494c7f2faa5ef/advanced-search.png)
![relationship-report](/uploads/1d37472120e4f2cde4b055a0c60b147b/relationship-report.png)
@ayduns, points in [this SE answer](https://civicrm.stackexchange.com/a/41871/104) a way to search for a specific active period.
![searchkit-approximation](/uploads/5d151234bd3093ab422ffd6b057d936c/searchkit-approximation.png)
This it’s good, but not enough. It’s very tricky to build this clause intuitively. And if you create an Afform with this SearchKit you can’t expose start dates and end dates to reproduce this clause.
Proposed behavior
----------------------------------------
Create an “Active period” search field selector available for entities with start and end dates: Relationships, Events, Memberships, Recurring contributions and Cases.
This would allow for example:
1. Click on **Search -> Search Kit**.
1. Search for **Relationships** or **Events**
1. Select **Active Period** in **where** clause
1. Choose options for filter **=**/**is Between** and **Pick Date**/**Date Range**...
Active period selector, like in the image below:
![active-period-field-selector](/uploads/f7bff145d568e35ad01ce87dd0f211f1/active-period-field-selector.png)
Comments
----------------------------------------
Would answer questions like:
[How to search active relationships (e.g) during past year?](https://civicrm.stackexchange.com/q/8315/104)
[Is it possible to get point-in-time membership data?](https://civicrm.stackexchange.com/q/2253/104) [duplicate](How do I determine how many active members there were on a date in the past? [duplicate])
[Create a report or graph of the number of campaigns active in any particular month](https://civicrm.stackexchange.com/q/34465/104)
Will cover the use of this extension [Historic Membership Data](https://github.com/fuzionnz/nz.co.fuzion.historicmembershipdata)https://lab.civicrm.org/dev/core/-/issues/3875Pressing return on additional participants page for event registration goes b...2023-06-03T19:57:34ZlarsssandergreenPressing return on additional participants page for event registration goes back to previous page instead of forwardThere are three buttons on the additional participant page: Go Back, Continue, Skip Participant. Since all three are type="submit", when you press the return/enter key, the first button of type="submit" is clicked, so you go back one pag...There are three buttons on the additional participant page: Go Back, Continue, Skip Participant. Since all three are type="submit", when you press the return/enter key, the first button of type="submit" is clicked, so you go back one page. Contrast with the primary participant registration page, where return does take you to the next page because there is only one button or with a contribution page where return takes you to the confirmation page, again because there is only one button.
The easiest fix would be to change the types of the other buttons to "button". The button type [is set here](https://github.com/civicrm/civicrm-core/blob/c94963f7637912571ce62b33de60f7d5ce640f69/CRM/Core/Form.php#L758) for all buttons as "submit" unless type="reset" is passed to addButtons. So I propose to review button types in use, setting those that make sense as "submit" (next, done, submit, upload, process, etc) and others as "button" (cancel, refresh). Any buttons without a type will be left as "submit" so as to avoid breaking anything.
There is also a class default added to buttons that have isDefault, but it's unclear to me what this does.https://lab.civicrm.org/dev/core/-/issues/3874APIv4 Relationships refused if duplicated2022-11-26T20:59:14ZshaneonabikeAPIv4 Relationships refused if duplicated**Backlog**
I see that @samuelsov already reported this, but the bot closed the issue #451.
**Disabled Relationships**
I came across a scenario where if a Contact Relationship was disabled, and you attempt to create a new one (that ma...**Backlog**
I see that @samuelsov already reported this, but the bot closed the issue #451.
**Disabled Relationships**
I came across a scenario where if a Contact Relationship was disabled, and you attempt to create a new one (that matches dates) it is refused. Ironically, the UI let's me add the Relationship.
+ Create a Relationship with a start / end date
+ Disable relationship
+ Create a new Relationship with the same start / end date via UI (works)
+ Create a new Relationship with the same start / end date via APIv4 (fails with Duplicate Exception)
**Cases**
Today, I came across another scenario where we are using ActivityProfile with CiviRules. The gist is that when someone submits a CiviCase then CiviRules assigned the Case Coordinator to their case. It's the same person each time.
In this scenario, the APIv4 is also refused the submission because of the duplicated Relationship. But really I think it makes sense to have multiple cases open for one person with the same case coordinator managing them all right?
My scenario can be replicated without ActivityProfile
+ Create a Case for test user A and Coordinator X
+ Create a new Case for Test User A
+ Use the APiv4 to setup a relationship to Coordinator X
It should throw an exception Duplicate Relationship on relationship.create.
Thoughts?https://lab.civicrm.org/dev/core/-/issues/3872Search on pledge payments on Find contributions screen2022-09-26T20:24:23ZyashodhaSearch on pledge payments on Find contributions screenIn _Find contributions_, if _CiviPledge_ is enabled, add search on pledge payments.
![se](/uploads/37de92cf4ea25288db09be94e60df203/se.png)
We do have bunch of options for search on contributions that are recurring or not, pay later o...In _Find contributions_, if _CiviPledge_ is enabled, add search on pledge payments.
![se](/uploads/37de92cf4ea25288db09be94e60df203/se.png)
We do have bunch of options for search on contributions that are recurring or not, pay later or not, would be helpful to check if the contribution is a pledge payment or not.
And based on the components enabled, we can have for event/membership as well.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/3871Write-off feature for pledges2022-10-11T13:07:54ZyashodhaWrite-off feature for pledges**Functional specifications:**
On a pledge, in _Edit Scheduled Payment_, we can delete a pledge payment. The total pledge amount is reduced by the amount of the scheduled payment and the balance due is recalculated.
But in this scenar...**Functional specifications:**
On a pledge, in _Edit Scheduled Payment_, we can delete a pledge payment. The total pledge amount is reduced by the amount of the scheduled payment and the balance due is recalculated.
But in this scenario, the pledge status is left as is.
We can also cancel a pledge. All scheduled payments are canceled but the pledge status is set to canceled and the pledge balance and the total pledge amount are not recalculated. So I propose a new feature for the write-off.
- Add the menu option “Write Off” before Cancel.
- All scheduled payments are canceled like for a pledge cancellation.
- Pledge status is changed to Completed.
- Total pledge amount is reduced by the existing pledge balance amount.
- Pledge balance is set to $0.
- An activity of type “Pledge write-off” is created and recorded on the contact.
- Activity Subject=total pledge amount
- Activity Date and time = date and time of the action
- Activity Status=Completed
- Actions available on the activity should be View and File on case only like for the activity type Contribution.
- The option _Write-Off_ is available only for a pledge that has at least one pledge payment. If no pledge payment has been recorded with a pledge, write-off doesn’t make any sense, so we should have only the options to delete or cancel a pledge.
- if pledge status =Pending or Overdue > Show only Cancel and Delete
- if pledge status = In progress > show only Write-Off and Delete
- if pledge status = Completed or Canceled > show only Deleteyashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/3869Cannot update contacts via profile from Search Kit results2023-09-22T02:06:27ZlarsssandergreenCannot update contacts via profile from Search Kit resultsIf you select contacts from Search Kit results and then select Profile Update from the Action menu, you are able to select a profile in the dialog box, but after clicking Continue, the dialog simply closes.
Tested on dmaster (5.55.alpha...If you select contacts from Search Kit results and then select Profile Update from the Action menu, you are able to select a profile in the dialog box, but after clicking Continue, the dialog simply closes.
Tested on dmaster (5.55.alpha1) and 5.49.5.https://lab.civicrm.org/dev/core/-/issues/3868Link contribution view with asssociated entity2023-05-18T23:37:57ZyashodhaLink contribution view with asssociated entityWhen you view a contribution, there's no way to know whether this contribution was done as a part of membership, pledge or an event registration.
I propose provide this additional data. Display this under total amount
e,g
![Screens...When you view a contribution, there's no way to know whether this contribution was done as a part of membership, pledge or an event registration.
I propose provide this additional data. Display this under total amount
e,g
![Screenshot_from_2022-09-23_19-15-29](/uploads/24028770f5b17e20ab40334973061b05/Screenshot_from_2022-09-23_19-15-29.png)
Membership will be a link to membership view page.
(depending on the related entity we display the link)yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/3867Subscription do-not-reply email causing issues with some mail servers connect...2023-11-20T23:59:49Znikola.mladenovicSubscription do-not-reply email causing issues with some mail servers connecting via SMTPOverview
----------------------------------------
We used integration via Contact Form 7 integration to connect Contact Form 7 in order to send data directly to CiviCRM. This works when server is connected to mail() but not via SMTP for ...Overview
----------------------------------------
We used integration via Contact Form 7 integration to connect Contact Form 7 in order to send data directly to CiviCRM. This works when server is connected to mail() but not via SMTP for some servers.
This issue is only present when you use Mailing Event: Subscribe to mailing list as Action in form processor.
The client uses cPanel, which by default has setup to decline all emails that do not exist (ex do-not-reply@domain.com). They do not use catchall. The issue itself is CiviCRM related, not FormProcessor.
When its set to SMTP, it tries to send email stimulating address do-not-reply@domain.com
Since it doesn't exist and SMTP is directly connected to only one email that wont work, as it tries to use that address for Subscribing process. When you send via mail() function you get email from proper email, but since server stimulates it, it doesn't cause a bug in that state.
Reproduction steps
----------------------------------------
1. Connect via SMTP to some cPanel SMTP or similar host that doesn't have catchall/VERP/do-not-reply@domain.com address present
2. Click on Administration -> Automation -> Form processor
2. Create Form processor that only has email for value
3. Add XCM contact matcher to match contact
4. Add type Mailing Event: Subscribe to mailing list
5. Save and Close -> Try out out
Current behaviour
----------------------------------------
When you try to fill out Contact Form 7 and it has SMTP connected, data is submitted but submission itself is not sent to the user.
When you use Try Out option for Form Processor you get error from the system: Unable to send email. Please report this message to the site administrator
In logs you can find this:
`[error] Mailing error: Failed to add recipient: user@website.org [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 550, response: Verification failed for...`
SMTP and bounce processing is functioning perfectly for newsletter.
Expected behaviour
----------------------------------------
It should by default use SMTP address not ask for do-not-reply@domain.com address as it sends even via SMTP with our hotfix. This causes issues for some SMTP connections, from some hosts. In this case from cPanel which does not have catchall setup or do-not-reply@domain.com address.
Current hotfix for client's needs
----------------------------------------
We made an edit in file civicrm/CRM/Mailing/Event/BAO/Subscribe.php on line 208 on master ('returnPath' => CRM_Core_BAO_Domain::getNoReplyEmailAddress()) to force to use same address as SMTP one and that works when subscription is received.
` 'returnPath' => 'smtp@domain.com',//CRM_Core_BAO_Domain::getNoReplyEmailAddress(), `
Environment information
----------------------------------------
* __Browser:__ _Firefox 105.0/Chrome 105.0.5195.127_
* __CiviCRM:__ _5.47.4_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _Php-7.4_
* __CMS:__ _Drupal-7.91_
* __Database:__ _mysql-8.0.30-0ubuntu0.20.04.2_
* __Web Server:__ _apache2-2.4.41_
Comments
----------------------------------------
Chat link of discussion:
https://chat.civicrm.org/civicrm/pl/1sqat1uwo3befca91akhmdzsre
Creating do-not-reply@domain.com address is also another fix, but its not noted anywhere but it should exist, either fixing this for global use or adding in CiviCRM to report that do-not-reply@domain.com doesn't exists should suffice.https://lab.civicrm.org/dev/core/-/issues/3861add message template id to sendmail function2022-09-23T02:19:02Zmagnolia61add message template id to sendmail functionOverview
----------------------------------------
In trying to use AlterMailParams I ran into this 'bug'. The MessageTemplateID is a field that is used in the email workflow functions, but when manually sending an email using a message t...Overview
----------------------------------------
In trying to use AlterMailParams I ran into this 'bug'. The MessageTemplateID is a field that is used in the email workflow functions, but when manually sending an email using a message template the ID is not passed on.
Reproduction steps
----------------------------------------
1. Send email manually to a contact using a message template
2. the message template ID is not passed from submit function to sendmail function in CRM/Contact/Form/Task/EmailTrait.php
3. AlterMailParams cannot use the message template ID for the kind of mails
Current behaviour
----------------------------------------
Message Template ID is not passed on to send email functions
Expected behaviour
----------------------------------------
Message Template ID is not passed on to send email functions
Environment information
----------------------------------------
- CiviCRM: 5.53.0
- CMS: Drupal 7.92
- PHP: 7.4.30 (fpm-fcgi)
- Database: 10.5.15-MariaDB-0+deb11u1-log engine: InnoDB 10 row format: Dynamic, Compressed
- Webserver: Apache/2.4.54 (Debian)
Comments
----------------------------------------
PR: https://github.com/civicrm/civicrm-core/pull/24583https://lab.civicrm.org/dev/core/-/issues/3860{event.location} token in scheduled reminders doesn't include supplemental lines2022-09-23T15:32:31ZDaveD{event.location} token in scheduled reminders doesn't include supplemental linesWhen composing a scheduled reminder for events there's a choice of token `{event.location}`. If your event location uses the supplemental address lines they are not included in this token.
It's the same in 5.44 so not a recent change.When composing a scheduled reminder for events there's a choice of token `{event.location}`. If your event location uses the supplemental address lines they are not included in this token.
It's the same in 5.44 so not a recent change.https://lab.civicrm.org/dev/core/-/issues/3859Participant's fee amount changes when saving the associated contribution2023-10-12T20:08:01ZJonGoldParticipant's fee amount changes when saving the associated contributionWhen someone registers multiple participants for an event, saving the contribution will change the participant's `fee_amount` for the last participant.
### Replication Steps
* Create a new paid event with online registration (let's say ...When someone registers multiple participants for an event, saving the contribution will change the participant's `fee_amount` for the last participant.
### Replication Steps
* Create a new paid event with online registration (let's say tickets are $5).
* Allow registering multiple participants.
* Register for the event with at least one additional registrant (let's assume one additional person, so $10 total).
* Look at both contact's participant records - their fee amount (on the "Events" tab) will show $5.
* Click **Edit** for the contribution record on the primary registrant and then **Save** with no changes.
### Expected Result
The fee amount on both participant records remains at $5.
### Actual Result
The fee amount on the second participant records changes to $10.
### Analysis
This happens at `CRM_Contribute_Form_Contribution::submit()` [line 1580](https://github.com/civicrm/civicrm-core/blob/76fd5a1cea97f280e24604e741dafa0dad303af5/CRM/Contribute/Form/Contribution.php#L1580).
We call `CRM_Contribute_BAO_Contribution::getComponentDetails()` which claims it "Returns all contribution related object ids" but assumes that there is only one participant (and membership) record tied to a contribution. So it returns the participant ID of the last person registered, and then at line 1611-1614, resaves the participant record with the total amount of the contribution.
### Next Steps
Line 1602 claims we are "updating the line items for participants", and I understand updating the `fee_amount` if the price changes. However, lines 1610-1614 are better out than in - they're more liable to give a wrong answer than a right one. Alternatively, we can limit it to only work on single line item contributions.
The next step would be to deprecate `CRM_Contribute_BAO_Contribution::getComponentDetails($this->_id)` since it can't handle multiple membership/participant records, and replace it with a function that does. Then we can fix the code that calls the deprecated function.
I realize none of this code should be at the form layer - but that's a much larger job.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3858Email displays twice on Contribution Confirmation/Thank-you pages2023-11-23T07:47:00ZJonGoldEmail displays twice on Contribution Confirmation/Thank-you pagesOverview
----------------------------------------
If you have a profile on your contribution page that includes an email field, the email appears twice on the Confirmation and Thank-You pages.
Reproduction steps
------------------------...Overview
----------------------------------------
If you have a profile on your contribution page that includes an email field, the email appears twice on the Confirmation and Thank-You pages.
Reproduction steps
----------------------------------------
1. Create a contribution page.
1. Add a profile to the page that contains an email.
1. Submit a contribution.
Current behaviour
----------------------------------------
![Selection_1638](/uploads/e0bfd95675953dadba161aa20e658a99/Selection_1638.png)
Expected behaviour
----------------------------------------
![Selection_1637](/uploads/9c06ec7dc2f1537c860e904ba02f76d4/Selection_1637.png)
Comments
----------------------------------------
When an email field is present in a profile, we correctly hide the email field from the main contribution page. This extends that behavior to the confirmation and thank-you.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3851Discussion: How to make past unsubscribes visible in the UI2022-10-11T10:38:49ZlarsssandergreenDiscussion: How to make past unsubscribes visible in the UIEdit: Title changed to reflect discussion, which has gone in a different (better) direction.
Sometimes, a contact unsubscribes from a group and is later re-added to the same group. After this happens, we no longer have any record of the...Edit: Title changed to reflect discussion, which has gone in a different (better) direction.
Sometimes, a contact unsubscribes from a group and is later re-added to the same group. After this happens, we no longer have any record of the contact unsubscribing as their group status has been updated to Added with the added date.
It would be useful to be able to check when a contact unsubscribed in order to troubleshoot (are contacts being re-added to groups they have unsubscribed from?), to confirm with the contact manually that they wish to be in a newsletter subscription group and generally to be able to say that the org has a record of the contact unsubscribing. Similarly, if a contact unsubscribes from a group that is later deleted, then there is no longer any record of their having unsubscribed.
So, I propose to add an activity whenever a contact unsubscribes from a group by email:
1. Add an activity type: Unsubscribe.
2. Whenever a contact unsubscribes by email, add an activity of this type with the subject indicating the group unsubscribed from and the mailing from which they unsubscribed: "Unsubscribed from GROUP via MAILING".
For similar record keeping purposes, I think it would make sense to do the same with opt outs, with a new Opt out activity type, with subject: "Opted out from bulk emails via MAILING".
In theory, these changes would be viewable in the change log, but that's only if you have logging turned on and are willing to trawl through many change log entries to try to find the relevant one. An activity would be much more usable and is in line with many other actions that are recorded as activities (like changes to recurring contributions, contributions themselves, membership status changes, event registrations and changes, etc).