-
-
Notifications
You must be signed in to change notification settings - Fork 825
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#561 Convert Case date fields on search forms from jcalendar … #15614
dev/core#561 Convert Case date fields on search forms from jcalendar … #15614
Conversation
(Standard links)
|
91ffa2d
to
a9863cc
Compare
@seamuslee001 OK - I'll test this but then we had better try to get https://github.com/civicrm/civicrm-core/pull/15370/files merged |
Actually @seamuslee001 I'll merge the other first since it has schema changes & then we can tweak this - is that OK? There is a minor bug with the other but we can fix that |
sure |
@seamuslee001 done - note we need to fix up the qill on subject now - as part of this or after. Can you rebase? |
a9863cc
to
3f31e75
Compare
@seamuslee001 also note this on the mailing one - https://github.com/civicrm/civicrm-core/pull/15369/files (although it has some changes in it that need teasing out IMHO) |
@eileenmcnaughton i am also getting an e-notice
now on a base search |
@seamuslee001 yeah - we need to fix that but it made more sense to bring it in & fix than stale that one & then fix IMHO |
@eileenmcnaughton the case_subject issue looks to be because https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Form/Search.php#L149 is converting the value to be an array |
@seamuslee001 yeah - the issue is the handling in buildQill - It needs to be something like
but I want it to be more generic / not need special casing |
3f31e75
to
f6286fb
Compare
@eileenmcnaughton i got it fixed in both parts now hopefully |
CRM/Contact/BAO/Query.php
Outdated
@@ -1828,6 +1830,12 @@ public function whereClauseSingle(&$values, $isForcePrimaryOnly = FALSE) { | |||
$this->buildRelativeDateQuery($values); | |||
return; | |||
} | |||
|
|||
// Handle situations where we have already gone through function convertTextStringsToUseLikeOperator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton this moves the handling that was added for the sortName field but tries to more generically handle it such that if we are in an array then set the $op to be LIKE and set the $value part of the key back to be the string rather than an arrray
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is still not working for me - let's pull it out & do it as a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok have pulled this change out
/** | ||
* @return null | ||
*/ | ||
public function getFormValues() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton this was what was causing the e-notice i was seeing
@seamuslee001 I'm OK to merge this but think more follow up is needed. It fixes the date fields but I think
However, this did correctly convert a smart group I created with a relative date. |
CRM/Contact/BAO/Query.php
Outdated
@@ -3498,7 +3506,7 @@ public function sortName(&$values) { | |||
return; | |||
} | |||
|
|||
$input = $value = is_array($value) ? trim($value['LIKE']) : trim($value); | |||
$input = $value = trim($value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pulled the change out
@seamuslee001 here is the cleanup I think we can do after |
…to datepicker Swap to using buildDateRangeQuery function Fix notice error and generically handle cases where we have specified to use the LIKE operator for strings
f6286fb
to
7d832c0
Compare
OK I'm good to merge with those changes bu we should do the follow up cleanup |
@demeritcowboy FYI |
Looks good except was the force=1 expected to work with dates? For example if I do |
…to datepicker
Overview
This converts the case start and case end date search fields from using the jcalendar to using datepicker
Before
Jcalendar is used for these fields
After
datepicker is used
https://lab.civicrm.org/dev/core/issues/561
ping @eileenmcnaughton @monishdeb @colemanw