Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-03-13T07:41:35Zhttps://lab.civicrm.org/dev/core/-/issues/4171FormBuilder: Create options to style radio buttons/checkboxes2023-03-13T07:41:35ZJonGoldFormBuilder: Create options to style radio buttons/checkboxesCurrently, there's no way to configure the style of radio buttons/checkboxes within the FormBuilder UI. It also doesn't respect the "Options Per Line" setting of the custom field.
Ideally we could specify vertical/horizontal/columns for...Currently, there's no way to configure the style of radio buttons/checkboxes within the FormBuilder UI. It also doesn't respect the "Options Per Line" setting of the custom field.
Ideally we could specify vertical/horizontal/columns for options.https://lab.civicrm.org/dev/core/-/issues/4170FormBuilder: Allow placing fields outside their entity fieldset2023-03-13T07:41:15ZJonGoldFormBuilder: Allow placing fields outside their entity fieldsetFrom today's FormBuilder meeting:
Currently, the markup for a field doesn't specify its entity, in order to facilitate creating reusable blocks. However, it would be beneficial to allow specifying the entity for a field within the field...From today's FormBuilder meeting:
Currently, the markup for a field doesn't specify its entity, in order to facilitate creating reusable blocks. However, it would be beneficial to allow specifying the entity for a field within the field's markup.
This would allow a UX-friendly way of freely ordering fields on a form without regard to the entity.https://lab.civicrm.org/dev/core/-/issues/4169Let "Number" and "Money"-type custom fields be nullable2023-03-13T07:39:11ZnoahLet "Number" and "Money"-type custom fields be nullableOverview
----------------------------------------
There are many times when NULL would be a meaningful/useful value in a custom field of type "Number" (float) or "Money" (decimal). However, it is not currently possible, via the form laye...Overview
----------------------------------------
There are many times when NULL would be a meaningful/useful value in a custom field of type "Number" (float) or "Money" (decimal). However, it is not currently possible, via the form layer, to set these fields to NULL. Blank values are currently turned into zero.
Example use-case
----------------------------------------
Let's say we need to track the elevation (meters above or below sea level) of the addresses in our database.
1. Create a custom field "Geographic Elevation" of type "Number", extending the Address entity. Leave the "Default value" blank.
1. Go to a contact and edit one of their addresses, or create a new one.
1. On the create/edit form, leave the "Geographic Elevation" field blank -- because let's say we don't know the elevation at this address.
1. Submit the form and view the saved value.
Current behaviour
----------------------------------------
"Geographic Elevation" is set to zero. That means sea level. But that's not correct -- we actually don't know the elevation.
Proposed behaviour
----------------------------------------
When the field submitted with a blank value (empty string), the database field should be set to NULL, and displayed as blank.
Comments
----------------------------------------
NULL is also a meaningful value for Money fields. Say we have a field on individuals called "Net Worth". Zero (the person is destitute) and NULL (we don't know how much money they have) are quite different.
It _is_ possible to set the field to NULL through the API, but only by passing the string 'null' (due to a PEAR DB limitation).
<details><summary>Show API example</summary>
````php
// NULL will be saved as 0
Civi\Api4\Address::update()
->addValue('Geography.Elevation', NULL)
->addWhere('id', '=', 27)
->execute();
$address = Civi\Api4\Address::get()
->addSelect('Geography.Elevation')
->addWhere('id', '=', 27)
->execute()->single();
// [
// 'id' => 27,
// 'Geography.Elevation' => 0,
// ]
// but 'null' will be saved as NULL
Civi\Api4\Address::update()
->addValue('Geography.Elevation', 'null')
->addWhere('id', '=', 27)
->execute();
$address = Civi\Api4\Address::get()
->addSelect('Geography.Elevation')
->addWhere('id', '=', 27)
->execute()->single();
// [
// 'id' => 27,
// 'Geography.Elevation' => null,
// ]
````
</details>https://lab.civicrm.org/dev/core/-/issues/4167Transferred to Link in View Event Registration for {participant} Goes to a Pr...2023-03-09T09:20:26ZLKuttnerTransferred to Link in View Event Registration for {participant} Goes to a Previous EventSteps to Reproduce:
- View an event registration that has been transferred to another participant.
- In the Status line, Click the name of the participant that the registration has been transferred to.
- Example: _Status | Transferred (...Steps to Reproduce:
- View an event registration that has been transferred to another participant.
- In the Status line, Click the name of the participant that the registration has been transferred to.
- Example: _Status | Transferred (Transferred to Megan Nedzinski)_
- The link takes you to the registration for the first event that the person was ever registered for.
- The link does not take you to the latest registration that was just transferred to that contact.
- This only happens in the View Event Registration for {participant} page.
- In the Edit Event Registration for {participant} page, clicking the equivalent link does take you to the correct event.
This is using CiviCRM 5.55.1 on Drupal 7. I just noticed this and don't know how long this behavior has been in effect.https://lab.civicrm.org/dev/joomla/-/issues/48CiviCRM profiles don't produce working webpages2023-05-15T18:56:34ZSOAPCiviCRM profiles don't produce working webpagesAfter upgrading my site to Joomla 4 all CiviCRM pages that are based on a CiviCRM profile refuse to display their content. Under Joomla 3 a page would render into a URL like website.org/name/user-directory. Under Joomla 4 the same page r...After upgrading my site to Joomla 4 all CiviCRM pages that are based on a CiviCRM profile refuse to display their content. Under Joomla 3 a page would render into a URL like website.org/name/user-directory. Under Joomla 4 the same page renders into the URL website.org/organisation/user-directory?view=Profiles&layout=search&task=civicrm/profile&gid=22&reset=1
Because the website (with its 100s of pages) uses mod_rewrite to remove the 'index.php' it also removes the index.php from the Joomla 4 CiviCRM URL. Adding the index.php manually to the URL in the browser does produce the information of the profile. It seems to me that under Joomla 3 that CiviCRM was working under an alias while under CiviCRM a long version of the URL is pushed to the browser that is messed up by the mod_rewrite. Anyway, in the current form I can't upgrade.
I include a screenshot of the type of menu where this issue occurs.
![Screenshot_2023-03-04_at_18.16.37](/uploads/461075cda2c4581d4abe42efc62cd622/Screenshot_2023-03-04_at_18.16.37.jpg)https://lab.civicrm.org/dev/core/-/issues/4162Up/down arrow on pager on a contact's Events tab doesn't do the right thing.2023-03-07T07:27:22ZDaveDUp/down arrow on pager on a contact's Events tab doesn't do the right thing.1. Find a contact that has attended 51+ events. Note you can use the api Participant.create to quickly generate some records against the same event+contact since otherwise this is a lot of clicking.
* Note even if you change the defau...1. Find a contact that has attended 51+ events. Note you can use the api Participant.create to quickly generate some records against the same event+contact since otherwise this is a lot of clicking.
* Note even if you change the default pager size at search settings it seems hardcoded to 50.
1. Visit the contact's events tab.
1. Click the up arrow on the pager page control.
1. It takes you to a new register participant form instead of the next page.
The next/last links work ok.
What's interesting is that the url in the network tab seems correct, and if you visit it standalone it does seem to run the event search form correctly. So I suspect something about the context is getting lost in the session. The relevant code might be in CRM_Event_Page_Tab.https://lab.civicrm.org/dev/joomla/-/issues/47Joomla upgrade process doesn't respect having different CiviCRM and Joomla da...2023-04-12T12:37:26Zchrisgaraffachris@aghstrategies.comJoomla upgrade process doesn't respect having different CiviCRM and Joomla databasesIf CiviCRM is using a different database than Joomla (CIVICRM_UF_DSN and CIVICRM_DSN are not the same), the Joomla upgrade process writes the new civicrm.settings.php files with both set to
This causes some chaos when the upgrade is "d...If CiviCRM is using a different database than Joomla (CIVICRM_UF_DSN and CIVICRM_DSN are not the same), the Joomla upgrade process writes the new civicrm.settings.php files with both set to
This causes some chaos when the upgrade is "done" as both settings files need to be updated quickly, and Civi unnecessarily creates all its tables again in the Joomla database.
A possible fix would be to have [civicrm_config](https://github.com/civicrm/civicrm-joomla/blob/28596149e1afe37d44d90e82809adfee7feb45c8/admin/configure.php#L230) get passed CIVCIRM_UF_DSN from [civicrm_source](https://github.com/civicrm/civicrm-joomla/blob/28596149e1afe37d44d90e82809adfee7feb45c8/admin/configure.php#L180) and parse it, using those values for `dbUser`, `dbPass`, `dbHost`, `dbName` instead of the `$jConfig` values. The function already gets passed site, credential & sign keys.
I haven't worked on a PR but will probably have time in the next week or two if there's interest.https://lab.civicrm.org/dev/core/-/issues/4160Convert html special chars to their ascii equivalent in ical file generation2023-03-07T07:26:05ZyashodhaConvert html special chars to their ascii equivalent in ical file generationWhen an event is set to public, the event registration receipt includes a link to download a .ics (ical) file of the event.
This ICS file is generated on the fly, and adds the description of the event to the description field in the .ics...When an event is set to public, the event registration receipt includes a link to download a .ics (ical) file of the event.
This ICS file is generated on the fly, and adds the description of the event to the description field in the .ics. All html tags are stripped from the text, however special chars that have been converted to their html code are not converted back to ASCII in the .ics.
We need to update the generation of the .ics file to include the conversion of html char code back to ASCII equivalent.
e.g.
- è ; > è
- " ; > "
- Â ; > Â
-   ; > [space]
(put the space before ; so that one can see the char code)
etc...yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4159CiviBuild with Redis crashes when `Redis` has list of extensions cached & `ci...2023-03-07T07:25:36ZeileenCiviBuild with Redis crashes when `Redis` has list of extensions cached & `civibuild create` calledJust noting down the suggested fix
suppose that cv core:install generates civicrm.settings.php and includes a constant:
define('CIVICRM_DEPLOY_ID', 'SoMe_RaNdOM_1234')
the CIVICRM_DEPLOY_ID would be reset each time you reinstall. it co...Just noting down the suggested fix
suppose that cv core:install generates civicrm.settings.php and includes a constant:
define('CIVICRM_DEPLOY_ID', 'SoMe_RaNdOM_1234')
the CIVICRM_DEPLOY_ID would be reset each time you reinstall. it could be included as part of the prefix/key for memcache/redis and php-cache-files
s.t. if you do a civibuild reinstall, any cache derived from CIVICRM_DEPLOY_ID is guaranteed to be resethttps://lab.civicrm.org/dev/core/-/issues/4148SearchKit: Add Actions to Grid Display2023-03-07T07:10:53ZyurgSearchKit: Add Actions to Grid DisplayOverview
----------------------------------------
SearchKit Grid Display lacks "Actions" menu
Example use-case
----------------------------------------Overview
----------------------------------------
SearchKit Grid Display lacks "Actions" menu
Example use-case
----------------------------------------https://lab.civicrm.org/dev/core/-/issues/4146Upgrade Smarty to Smarty3+2024-01-03T19:48:39ZeileenUpgrade Smarty to Smarty3+This is a meta issue for looking at moving from Smarty2 to Smarty3+
**Status as of 5.68 - Smarty3 is optional, It is recommended in 5.69 as the preferred version**
to enable - add a define to `civicrm_settings.php` like this (adjust...This is a meta issue for looking at moving from Smarty2 to Smarty3+
**Status as of 5.68 - Smarty3 is optional, It is recommended in 5.69 as the preferred version**
to enable - add a define to `civicrm_settings.php` like this (adjust sample path as desired)
```
if (!defined('CIVICRM_SMARTY3_AUTOLOAD_PATH')) {
define('CIVICRM_SMARTY3_AUTOLOAD_PATH', $civicrm_root . '/packages/smarty3/vendor/autoload.php');
}
```
**Gaps as of 5.68**
- [x] resolve Sections section of civi-report https://github.com/civicrm/civicrm-core/pull/27777
- [x] the online membership receipt has an instance of 'crmMoney maths' - this should be the same as other templates - I'm just struggling to understand the double contribution thing with separate membership payment
- [ ] not all extensions are compatible - see below
**Things that cause compatibility issues** (resolve in core with the exception of the 2 listed)
- **maths** in Smartyv2 {$amount+$taxAmount|crmMoney} is implicitly `{($amount+$taxAmount)|crmMoney}` - whereas in Smarty3 it does not resolve correctly without the braces - which Smarty2 does not support. Generally the maths can be moved to the php layer
- Extensions with CiviX versions lower than 23.01 - mostly these only cause notices & smarty files will not load - although some very old civix versions will cause a hard fail. Running civix will remove these lines
![image](/uploads/6ec4b8e83ac6fa02c1ec6d0bec57bac8/image.png)
And add in the smarty mixin if smarty files are in use
- Accessing the smarty property `_tplVars` directly (in most cases running civix will fix)
- usage of `{php}` within tpl files
- incorrect variable assignments in templates for correct quotes and backticks, e.g.
```
{assign var="foo" value="bar-`$something.else`"}
```
if a variable is being concatenated into a string in a template, the string should be surrounded by double quotes, not single. If the variable name contains characters other than a-zA-Z0-9_ (e.g. a period), then it needs to be surrounded by backticks. If a variable is an int and you're doing math, don't use backticks (e.g. `value=$one.thing+1`).
**Why smarty3**
1. Accessing documentation is less confusing as Smarty documentation targets v3+
2. Smarty3 is more secure - in part because it has security releases, in part because escaping is on by default - which actually still seems disabled in the working version - but it makes sense to upgrade smarty first
3. Smarty3 is more efficient in handling one-off strings. We have kinda hacked this into Smartyv2 with a combination of the core function `CRM_Utils_String::parseOneOffStringThroughSmarty` and hacking some security into `fetch` but under volume this can result in #4143 and also reads & writes to disk more than is ideal
4. The work to get to Smarty4 is the same as the work to get to Smarty3 (mostly done) + an unknown extra amount of work. Not a bad thing to do but a big scope creep
5. In theory `Smarty3` is a relatively [seemless upgrade from Smartyv2](https://github.com/smarty-php/smarty/blob/v3.1.47/SMARTY_2_BC_NOTES.txt).
**Things that need to be done in extensions**
Other than the first item these are fairly uncommong
1) run `civix upgrade` on extensions where [the civix version of the extension is 23.01 or lower](https://github.com/civicrm/civicrm-core/pull/27565#issuecomment-1732155043). (it's worth making sure you have the [latest civix first](https://github.com/totten/civix/tree/master)
4) test any unusual smarty screens
**Challenges outstanding**
1) When we are happy from a QA point ov view we need to roll it out as part of our package. At that point we will need to decide if it is opt in & what that looks like or whether it is a hard-switch.
** Challenges that we are doing OK on **
- **Autoloading** - works OK if extensions are updated to recent civix.
- **Function Naming** - Smarty3 has renamed a bunch of functions - eg `register_resource` becomes `registerResource`. This seems to be manageable with [a compatibility class](https://github.com/civicrm/civicrm-core/pull/27585) - allowing us to switch to the forward compatible function names. Note it really is mostly (maybe only) core that interacts with these functions
- **Fetch override** - We have overridden the `fetch` function to try to mimic Smartyv3 security in v2 - this function has a different signature in `v3` so overriding it is a noisy experience. [Solution is to move our patches to Smartyv2 packages](https://github.com/civicrm/civicrm-core/pull/27588)
- **Escape by default** - so far this seems to have not been enabled on Smarty3 - I think it's fine to defer worrying about it until the upgrade is done if it is not hurting us
- **Invalid Smarty Syntax** - so far I have identified that the use of '`' in Smarty causes a hard crash - we don't do this much, mostly in older code... @larssg has done a [pretty solid clean up in core](https://github.com/civicrm/civicrm-core/pull/27547) but there could be some in extensions
- **Direct access of class properties** - we have a couple of places that do things like `$smarty->_tpl_vars` - those need replacing with `get_template_vars or, if we add compatibility `getTemplateVars`
- **Register String Resource** - this is not an issue for `v3` but is the current blocker on `v4` the parameter type in our function `civicrm_smarty_register_string_resource` is an `array` but that is not v4-compatible
**Related**
https://lab.civicrm.org/dev/core/-/issues/4618https://lab.civicrm.org/dev/joomla/-/issues/46KC Finder Not Working Under Joomla 42023-12-11T14:04:46ZcrusonwebKC Finder Not Working Under Joomla 4I have discovered that currently KC Finder will not work under Joomla 4. If you click the Browse Server button when inserting an image into the editor using CKEditor 4, CKEditor 5 or TinyMCE you get a 500 error. I have recreated this o...I have discovered that currently KC Finder will not work under Joomla 4. If you click the Browse Server button when inserting an image into the editor using CKEditor 4, CKEditor 5 or TinyMCE you get a 500 error. I have recreated this on multiple client sites running Joomla 4.2.7 and 4.2.8 and CiviCRM 5.57.0 and 5.58.1. I have also recreated it on the Joomla 4 demo site, although I had to turn off Mosaico to do so (since it is on by default).
I did some digging and the problem appears to rest in the authenticate_joomla function within /packages/kcfinder/integration/civicrm.php which is using JFactory::getApplication('administrator'). Under Joomla 4, getApplication doesn't work the same way it did under Joomla 3 so you get the non-descript 500 error screen. I updated the code with the following block and that worked in most of my cases:
```
if (version_compare(JVERSION, '4.0.0', 'lt')) {
$mainframe = JFactory::getApplication('administrator');
$mainframe->initialise();
$user_id = JFactory::getUser()->id;
} else {
// Boot the DI container.
$container = \Joomla\CMS\Factory::getContainer();
// Alias the session service key to the web session service.
$container->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');
// Get the application.
$app = $container->get(\Joomla\CMS\Application\AdministratorApplication::class);
$user_id = Joomla\CMS\Factory::getUser()->id;
}
```
In all but one case this got KC Finder working, that last case I ended up with the folder and file fields both saying "Unknown Error" which I am thinking is due to something specific to that site and not Civi. However, I am not 100% confident my approach is the right one so I wanted to raise this as an issue so another set of eyes could confirm or correct my solution.Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/4143Smarty bus errors2023-02-24T22:05:21ZeileenSmarty bus errorsSmarty can show bus errors under load
See
Truncating a compiled template leads to concurrency issues if another process is including the same file. See also CRM-11189 for a description of the "bus error" encountered when one of the co...Smarty can show bus errors under load
See
Truncating a compiled template leads to concurrency issues if another process is including the same file. See also CRM-11189 for a description of the "bus error" encountered when one of the concurrent processes dies.
CRM-19013: Compiled templates are truncated
CRM-11189: When CiviMail renders smarty templates for mailing, it saves them to disk
https://github.com/civicrm/civicrm-packages/pull/158https://lab.civicrm.org/dev/core/-/issues/4141API4: When searching by date range, end of range is not included2023-04-22T17:05:33ZlarsssandergreenAPI4: When searching by date range, end of range is not includedWhen you use SearchKit to search by date range on a datetime field (i.e. between two dates), the end date is not included in the results because it interprets 12/31/2022 as 20221231000000 instead of the expected 20221231235959. The same ...When you use SearchKit to search by date range on a datetime field (i.e. between two dates), the end date is not included in the results because it interprets 12/31/2022 as 20221231000000 instead of the expected 20221231235959. The same happens in FormBuilder with a date filter and Choose date range. This comes from API4, where `->addWhere('receive_date', 'BETWEEN', ['2022-01-01', '2022-12-31'])` is interpreted as to 20221231000000 rather than to 20221231235959.
This is quite confusing for users, e.g. when last quarter doesn't give the same results as 10/01/2022 - 12/31/2022.
I think the fix is simply to use a default time of 23:59:59 if none is specified for an end date, but I'm not sure if that might cause unexpected behaviour elsewhere.https://lab.civicrm.org/dev/core/-/issues/4139Form Builder: Display only field fixes for date, checkbox, radio, select and ...2023-02-24T07:10:42ZKurund JalmiForm Builder: Display only field fixes for date, checkbox, radio, select and entity ref fieldsCurrently, display only fields shows raw values which works well only for text fields.
We need to fix the display for the following data types:
- Date
- Select
- Checkbox
- Radio
- Select
- Entity RefCurrently, display only fields shows raw values which works well only for text fields.
We need to fix the display for the following data types:
- Date
- Select
- Checkbox
- Radio
- Select
- Entity RefKurund JalmiKurund Jalmihttps://lab.civicrm.org/dev/core/-/issues/4137Possible issue with Token processor and Smarty2023-03-03T20:07:08ZGuillaumeSorelPossible issue with Token processor and SmartyWhen using smarty logic with custom fields they don't get considered as numeric values any more so no calculation operation can be processed.
Sent as a 'normal' token, the token get merged. Nothing in the configuration changed. The custo...When using smarty logic with custom fields they don't get considered as numeric values any more so no calculation operation can be processed.
Sent as a 'normal' token, the token get merged. Nothing in the configuration changed. The custom are still declared as numeric.
If combined with smarty, they become simple 'text' values and in our situation nothing happens, when it should be.
This process was working since months until upgrading to 5.58.1 (on WP 6.1.1 and php 7.4) and was used many times to edit invoices:
```
{if $contact.custom_147==0}{else}- {contact.custom_147} Licences assurances annuelles = {$contact.custom_147*20}€{/if}
{if $contact.custom_154==0}{else}- {contact.custom_154} Licences assurances occasionnelles = {$contact.custom_154*15}€{/if}
{if $contact.custom_155==0}{else}- {contact.custom_155} Frais de gestion pour membre stagiaire en formation secourisme = {$contact.custom_155*10}€{/if}
{if $contact.custom_156==0}{else}- {contact.custom_156} Frais d'affiliation = {$contact.custom_156*150}€{/if}
Total réglé = {math equation="(op1*20)+(op2*15)+(op3*10)+(op4*150)" op1=$contact.custom_147 op2=$contact.custom_154 op3=$contact.custom_155 op4=$contact.custom_156}€
```
and this should show something like
- 2 Licences assurances annuelles = 40€
- 3 Frais de gestion pour membre stagiaire en formation secourisme = 30€
Total réglé = 70€https://lab.civicrm.org/dev/core/-/issues/4136Saving Repeating Events causes Registration date to be copied and/or overwritten2023-02-20T06:29:43ZshaneonabikeSaving Repeating Events causes Registration date to be copied and/or overwrittenOverview
----------------------------------------
Repeating Events are amazing for structuring recurring events. For a client, we had about 12 events scheduled and I wanted to add a new payment processor to those events. Upon adding tha...Overview
----------------------------------------
Repeating Events are amazing for structuring recurring events. For a client, we had about 12 events scheduled and I wanted to add a new payment processor to those events. Upon adding that to the Fees , and applying it to all the Events it changed all the ```Registration dates``` to match the first event :face_palm:
Reproduction steps
----------------------------------------
1. Create an Event
1. Set some fees and one payment processor
1. Set a Start date and Registration date a week before the start date
1. Set the repeat tab to ```Repeats every```: 1 month on the Third Thursday
1. Set an End after 11 occurrences
1. Save the Event choosing ```Every Event``` in the popup
1. Edit one of the Events
1. Check off another payment processor
1. Save the Event
1. The Registration date has changed on all the events
Expected behaviour
----------------------------------------
Basically, I was thinking that either A) we detect this is a modification and don't propagate OR B) we just don't propagate that field since it doesn't seem to make sense (at least to me) to do that on repeating events.https://lab.civicrm.org/dev/core/-/issues/4134SearchKit: Add TIMESTAMPDIFF to calculate between two dates in years, months,...2023-08-30T15:49:10ZfrancescbassasSearchKit: Add TIMESTAMPDIFF to calculate between two dates in years, months, weeks, etc.Overview
----------------------------------------
Allow to calculate number of days, weeks, months, years, etc. between two dates.
[DATEDIFF](https://github.com/civicrm/civicrm-core/pull/24875) only allows to calculate difference betwee...Overview
----------------------------------------
Allow to calculate number of days, weeks, months, years, etc. between two dates.
[DATEDIFF](https://github.com/civicrm/civicrm-core/pull/24875) only allows to calculate difference between two days in days. Instead, TIMESTAMPDIFF allows set the unit (years, months, weeks, etc.) units in which you want to get the difference between two dates.
Eg. to calculate age of a contact at the time they registered for an event between contact birthday and registration event date.
Current behaviour
----------------------------------------
Can't calculate years between two dates.
![datediff](/uploads/b7a37ccd3a0c048750934fadc5cf5763/imatge.png)
Proposed behaviour
----------------------------------------
Can calculate years (and FRAC_SECOND (microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER) between two dates.
![timestampdiff1](/uploads/6dcc9610fd2fc195d2157007f3b71fba/Captura_de_pantalla_de_2023-02-17_09-36-56.png)
![timestampdiff2](/uploads/b6e7b2822f7a55eee279ea251536f913/imatge.png)
Comments
----------------------------------------
TIMESTAMPDIFF can in principle reproduce the same behavior as DATEDIFF. If so, current _Days between two dates_ field transformation could be replaced with _Diff between two dates_ ensuring that it continues to work for old cases.https://lab.civicrm.org/dev/core/-/issues/4133Search Kit: date field - more transformation options2023-02-20T06:26:43ZherbdoolSearch Kit: date field - more transformation optionsThis is a follow-up to https://lab.civicrm.org/dev/core/-/issues/3700, which despite it's title only dealt with aggregating by partial dates. This one is to expand the date options in the Field Transformations for date fields in SearchKi...This is a follow-up to https://lab.civicrm.org/dev/core/-/issues/3700, which despite it's title only dealt with aggregating by partial dates. This one is to expand the date options in the Field Transformations for date fields in SearchKit.
[As mentioned here](https://lab.civicrm.org/dev/core/-/issues/3700#note_80020), it would something similar to:
![Captura_de_pantalla_de_2022-08-04_18-54-00](https://lab.civicrm.org/dev/core/uploads/aca17ace20d78328c85a71a17fcfbabd/Captura_de_pantalla_de_2022-08-04_18-54-00.png)
---
Note that transforming the dates *is* possible by enabling "Rewrite Text" for a field in a display. Then doing something like:
```
{"[join_date]"|date_format:"%m/%d/%Y"}
```
Or whatever the token is for the date field.
It would be handy to have a section in the [User Guide](https://docs.civicrm.org/user/en/latest/searching/searchkit) on some of these tricks for SearchKit. Would save time from asking in the chat.https://lab.civicrm.org/dev/core/-/issues/4129API v4 explorer: boolean params don't render correctly for CV (short)2023-02-20T06:24:39ZnoahAPI v4 explorer: boolean params don't render correctly for CV (short)The API4 explorer generates shorthand `cv` syntax that looks like, for example:
````bash
cv api4 Contact.delete +w 'id = 99' checkPermissions=false useTrash=false
````
However, `cv` does not correctly interpret `false` in this context....The API4 explorer generates shorthand `cv` syntax that looks like, for example:
````bash
cv api4 Contact.delete +w 'id = 99' checkPermissions=false useTrash=false
````
However, `cv` does not correctly interpret `false` in this context. The syntax that works is:
````bash
cv api4 Contact.delete +w 'id = 99' checkPermissions=0 useTrash=0
````
So the explorer should generate that syntax.