Skip to content

Instantly share code, notes, and snippets.

@JoeMurray
JoeMurray / gist:8d3d3dbf8fbc7a6b9bae6fe51b42c58c
Last active October 20, 2023 21:06
Montreal Admin Training text
A comprehensive two day hands on training course covering the configuration, administration, and every-day use of CiviCRM. This event is aimed at administrators and technical users at organisations that are either using CiviCRM, or interested in evaluating it. It is also useful for staff at organisations that develop or implement CiviCRM who need a complete understanding of "out of the box" features and configuration options.
Agenda
We try to be flexible with the agenda to meet participant requirements and expectations, and the final agenda may change. Topics will include:
Introduction to CiviCRM - what does it do and how can it help your organisation
Installation and configuration - making CiviCRM work for you
Custom data and profiles - extending CiviCRM to meet your data requirements
CiviCRM components - including event, mail, member, contribute, case, report, grant and pledge
Custom searches and forms - using SearchKit and FormBuilder
@JoeMurray
JoeMurray / gist:0d8663e9f034c0b5e23b123e75c9fa07
Created December 21, 2021 19:08
diff patch to enable 2nd client sender for cividesk SparkPost ext
diff -ruN com.cividesk.email.sparkpost/CRM/Sparkpost/Page/callback.php /home/client1.jmaconsulting.biz/htdocs/sites/all/extensions/com.cividesk.email.sparkpost/CRM/Sparkpost/Page/callback.php
--- com.cividesk.email.sparkpost/CRM/Sparkpost/Page/callback.php 2018-11-27 04:35:53.000000000 -0500
+++ /home/client1.jmaconsulting.biz/htdocs/sites/all/extensions/com.cividesk.email.sparkpost/CRM/Sparkpost/Page/callback.php 2020-05-17 22:16:36.705126772 -0400
@@ -65,15 +65,16 @@
foreach ($elements as $element) {
if ($element->msys && ($event = $element->msys->message_event)) {
// Sanity checks
+ $client2 = CRM_Sparkpost::isclient2();
if ( !in_array($event->type, array('bounce', 'spam_complaint', 'policy_rejection'))
- || ($event->campaign_id && ($event->campaign_id != CRM_Sparkpost::getSetting('sparkpost_campaign')))
@JoeMurray
JoeMurray / gist:a31830afbe172c5fa88f4e4595c08b24
Created June 10, 2020 17:51
iATS 1st Payments bug fix release
The following 1stPay Gateway fixes have been released:
ACH Status
Impact: Integrators using Rest API and ACH
Previously: ACH transactions were left in 'Pending' status, partners had to rely on whether a batch number was displayed to know if the transaction was settled
Now: ACH transactions will appropriately reflect as 'Settled' both in RestAPI Query and Transaction Center
Batch Number
@JoeMurray
JoeMurray / gist:6db6a82ff6c9e593ca5301b5f8708f52
Last active May 21, 2020 15:35
issue with 2020-04-16 financial transactions on contributions with other dates
Background: A 2014-10-04 contribution with bank fee was imported 2020-04-01. A change in its financial type that changed the revenue financial account was made on 2020-04-16.
Bug 1: the value in civicrm_financial_trxn.fee_amount for reversal transaction 193392 should be the negative of the original amount, ie -0.39 rather than 0.39. This would result in the net_amount value for that record being -9.61 (correct) rather than -10.39 (incorrect).
Bug 2: on import via api, the civicrm_financial_item.transaction_date for the banking fee record is incorrectly set to the import date rather than the transaction date (ie for record 41350 below, the date should be 2014-10-04 13:55:26).
MariaDB [mydb]> select * from civicrm_financial_trxn where id in (143964,143965,193392,193393);
+--------+---------------------------+-------------------------+---------------------+--------------+------------+------------+----------+------------+---------------+------------------+-----------+----------------------+-------------------
SELECT
fa.name as civicrm_contact_financial_account,
contribution_civireport.id as contribution_id,
contribution_civireport.currency as civicrm_contribution_currency,
IF(ISNULL(ft.from_financial_account_id),fi.amount,-fi.amount) as civicrm_contribution_amount_sum
FROM civicrm_contact contact_civireport
INNER JOIN civicrm_contribution contribution_civireport ON contact_civireport.id = contribution_civireport.contact_id AND contribution_civireport.is_test = 0
INNER JOIN civicrm_entity_financial_trxn eft_c ON contribution_civireport.id = eft_c.entity_id AND eft_c.entity_table = 'civicrm_contribution'
INNER JOIN civicrm_financial_trxn ft ON eft_c.financial_trxn_id = ft.id
@JoeMurray
JoeMurray / trialbalance.sql
Created March 9, 2020 08:18
Trial Balance Report SQL
SELECT SQL_CALC_FOUND_ROWS financial_account_civireport.accounting_code as civicrm_financial_account_accounting_code, financial_account_civireport.name as civicrm_financial_account_name, financial_trxn_civireport.chapter_to as civicrm_chapter_entity_chapter_code_to, financial_trxn_civireport.chapter_from as civicrm_chapter_entity_chapter_code_from, financial_trxn_civireport.fund_to as civicrm_chapter_entity_fund_code_to, financial_trxn_civireport.fund_from as civicrm_chapter_entity_fund_code_from, SUM(debit) as civicrm_financial_trxn_debit, SUM(credit) as civicrm_financial_trxn_credit
FROM (
SELECT cft1.id, 0 as fid, 0 AS credit, cft1.total_amount AS debit,
cft1.to_financial_account_id AS financial_account_id,
'' AS chapter_from, ce.chapter_code AS chapter_to, '' AS fund_from, ce.fund_code AS fund_to
FROM civicrm_financial_trxn cft1
LEFT JOIN civicrm_chapter_entity ce ON ce.entity_id = cft1.id AND ce.entity_table = 'civicrm_financial_trxn'
WHERE cft1.trxn_date <= DATE('2019-01-31')
UNION
SELECT cft2.id, 0 as
We’re delighted to announce the inaugural year of Season of Docs, a Google program that fosters collaboration between open source projects
and technical writers. Season of Docs is similar to Summer of Code, but with a focus on open source documentation and technical writers.
Details are on our website: g.co/seasonofdocs.
Would you like to take part as an open source mentor in the inaugural year of Season of Docs? Open source organizations can start thinking
now about the projects you’d like a technical writer to work on. Take a look at the examples of project ideas. Reach out to your community
members to see who’d like to be a mentor for Season of Docs. As a mentor, you don’t need technical writing skills. Instead, you're a
member of the open source organization who knows the value of good documentation and who is experienced in open source processes and
tools. See the guidelines on working with a technical writer. Organization applications open on April 2, 2019. See the full timeline on
the Season of
@JoeMurray
JoeMurray / gist:e27530b1635a105c670ceb6ae05e92d5
Created December 11, 2018 22:00
Workbench SQL Server migration error re 'utf16' codec can't decond byte
Starting...
Connect to source DBMS...
- Connecting...
Connect to source DBMS done
Reverse engineer selected schemas....
Reverse engineering dbo from RE7_39450
- Reverse engineering catalog information
- Reverse engineering User Data Types...
$ civibuild create drupal-demo
[[Download drupal-demo (type 'drupal-demo' in '/Users/josephmurray/buildkit/build/drupal-demo')]]
[[Update caches]]
[[Initialize cache dir: /Users/josephmurray/buildkit/app/tmp/git-cache/civicrm/civicrm-backdrop.git]]
Cloning into bare repository '/Users/josephmurray/buildkit/app/tmp/git-cache/civicrm/civicrm-backdrop.git'...
remote: Enumerating objects: 4864, done.
remote: Total 4864 (delta 0), reused 0 (delta 0), pack-reused 4864
Receiving objects: 100% (4864/4864), 1.44 MiB | 0 bytes/s, done.
Resolving deltas: 100% (3287/3287), done.
Checking connectivity... done.
$ grep -R 'This event is currently full. However you can register now and get added to a waiting list. You will be notified if spaces become available.' ./*
./CRM/Event/Form/Registration/Register.php: $this->_waitlistMsg = ts('This event is currently full. However you can register now and get added to a waiting list. You will be notified if spaces become available.');
./CRM/Event/Form/ManageEvent/EventInfo.php: $defaults['waitlist_text'] = CRM_Utils_Array::value('waitlist_text', $defaults, ts('This event is currently full. However you can register now and get added to a waiting list. You will be notified if spaces become available.'));