Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* [CHD-2894] [Search] Quick fulltext searches weren't matching wildca…

…rds like "*meet*" when using 'phrase' or 'all words'. Added 'expert' mode to quick search for messages and comments.
  • Loading branch information...
commit e24a38b70864dda915dc454aecd0b9f18a5e56b7 1 parent 7cc3b44
Jeff Standen authored
8 features/cerberusweb.core/api/uri/contacts.php
@@ -2026,6 +2026,10 @@ function doAddressQuickSearchAction() {
2026 2026 $params[SearchFields_Address::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_Address::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'all'));
2027 2027 break;
2028 2028
  2029 + case "comments_expert":
  2030 + $params[SearchFields_Address::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_Address::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'expert'));
  2031 + break;
  2032 +
2029 2033 case "comments_phrase":
2030 2034 $params[SearchFields_Address::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_Address::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'phrase'));
2031 2035 break;
@@ -2070,6 +2074,10 @@ function doOrgQuickSearchAction() {
2070 2074 $params[SearchFields_ContactOrg::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_ContactOrg::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'all'));
2071 2075 break;
2072 2076
  2077 + case "comments_expert":
  2078 + $params[SearchFields_ContactOrg::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_ContactOrg::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'expert'));
  2079 + break;
  2080 +
2073 2081 case "comments_phrase":
2074 2082 $params[SearchFields_ContactOrg::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_ContactOrg::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'phrase'));
2075 2083 break;
8 features/cerberusweb.core/api/uri/tickets.php
@@ -888,10 +888,18 @@ function doQuickSearchAction() {
888 888 $params[SearchFields_Ticket::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_Ticket::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'all'));
889 889 break;
890 890
  891 + case "comments_expert":
  892 + $params[SearchFields_Ticket::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_Ticket::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'expert'));
  893 + break;
  894 +
891 895 case "comments_phrase":
892 896 $params[SearchFields_Ticket::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_Ticket::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'phrase'));
893 897 break;
894 898
  899 + case "messages_expert":
  900 + $params[SearchFields_Ticket::FULLTEXT_MESSAGE_CONTENT] = new DevblocksSearchCriteria(SearchFields_Ticket::FULLTEXT_MESSAGE_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'expert'));
  901 + break;
  902 +
895 903 case "messages_all":
896 904 $params[SearchFields_Ticket::FULLTEXT_MESSAGE_CONTENT] = new DevblocksSearchCriteria(SearchFields_Ticket::FULLTEXT_MESSAGE_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'all'));
897 905 break;
6 features/cerberusweb.core/strings.xml
@@ -1426,12 +1426,18 @@ For example: http://www.cerberusweb.com/support/</seg></tuv>
1426 1426 <tu tuid='mail.quick_search.comments_all'>
1427 1427 <tuv xml:lang="en_US"><seg>Comments (all words)</seg></tuv>
1428 1428 </tu>
  1429 + <tu tuid='mail.quick_search.comments_expert'>
  1430 + <tuv xml:lang="en_US"><seg>Comments (expert)</seg></tuv>
  1431 + </tu>
1429 1432 <tu tuid='mail.quick_search.comments_phrase'>
1430 1433 <tuv xml:lang="en_US"><seg>Comments (phrase)</seg></tuv>
1431 1434 </tu>
1432 1435 <tu tuid='mail.quick_search.messages_all'>
1433 1436 <tuv xml:lang="en_US"><seg>Messages (all words)</seg></tuv>
1434 1437 </tu>
  1438 + <tu tuid='mail.quick_search.messages_expert'>
  1439 + <tuv xml:lang="en_US"><seg>Messages (expert)</seg></tuv>
  1440 + </tu>
1435 1441 <tu tuid='mail.quick_search.messages_phrase'>
1436 1442 <tuv xml:lang="en_US"><seg>Messages (phrase)</seg></tuv>
1437 1443 </tu>
1  features/cerberusweb.core/templates/contacts/addresses/quick_search.tpl
@@ -6,5 +6,6 @@
6 6 <option value="org">{$translate->_('contact_org.name')|capitalize}</option>
7 7 <option value="comments_all"{if $quick_search_type eq 'comments_all'}selected{/if}>{$translate->_('mail.quick_search.comments_all')}</option>
8 8 <option value="comments_phrase"{if $quick_search_type eq 'comments_phrase'}selected{/if}>{$translate->_('mail.quick_search.comments_phrase')}</option>
  9 + <option value="comments_expert"{if $quick_search_type eq 'comments_expert'}selected{/if}>{$translate->_('mail.quick_search.comments_expert')}</option>
9 10 </select><input type="text" name="query" class="input_search" size="24"><button type="submit">{$translate->_('common.search_go')|lower}</button>
10 11 </form>
1  features/cerberusweb.core/templates/contacts/orgs/quick_search.tpl
@@ -6,5 +6,6 @@
6 6 <option value="phone" {if $quick_search_type eq 'phone'}selected{/if}>{$translate->_('contact_org.phone')|capitalize}</option>
7 7 <option value="comments_all"{if $quick_search_type eq 'comments_all'}selected{/if}>{$translate->_('mail.quick_search.comments_all')}</option>
8 8 <option value="comments_phrase"{if $quick_search_type eq 'comments_phrase'}selected{/if}>{$translate->_('mail.quick_search.comments_phrase')}</option>
  9 + <option value="comments_expert"{if $quick_search_type eq 'comments_expert'}selected{/if}>{$translate->_('mail.quick_search.comments_expert')}</option>
9 10 </select><input type="text" name="query" class="input_search" size="24"><button type="submit">{$translate->_('common.search_go')|lower}</button>
10 11 </form>
2  features/cerberusweb.core/templates/tickets/quick_search_box.tpl
@@ -10,8 +10,10 @@
10 10 <option value="subject"{if $quick_search_type eq 'subject'}selected{/if}>{$translate->_('ticket.subject')|capitalize}</option>
11 11 <option value="comments_all"{if $quick_search_type eq 'comments_all'}selected{/if}>{$translate->_('mail.quick_search.comments_all')}</option>
12 12 <option value="comments_phrase"{if $quick_search_type eq 'comments_phrase'}selected{/if}>{$translate->_('mail.quick_search.comments_phrase')}</option>
  13 + <option value="comments_expert"{if $quick_search_type eq 'comments_expert'}selected{/if}>{$translate->_('mail.quick_search.comments_expert')}</option>
13 14 <option value="messages_all"{if $quick_search_type eq 'messages_all'}selected{/if}>{$translate->_('mail.quick_search.messages_all')}</option>
14 15 <option value="messages_phrase"{if $quick_search_type eq 'messages_phrase'}selected{/if}>{$translate->_('mail.quick_search.messages_phrase')}</option>
  16 + <option value="messages_expert"{if $quick_search_type eq 'messages_expert'}selected{/if}>{$translate->_('mail.quick_search.messages_expert')}</option>
15 17 </select><input type="text" name="query" class="input_search" size="16" class="input_search"><button type="submit">{$translate->_('common.search_go')|lower}</button>
16 18 </form>
17 19 {/if}
4 features/cerberusweb.crm/api/App.php
@@ -651,6 +651,10 @@ function doQuickSearchAction() {
651 651 $params[SearchFields_CrmOpportunity::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_CrmOpportunity::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'all'));
652 652 break;
653 653
  654 + case "comments_expert":
  655 + $params[SearchFields_CrmOpportunity::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_CrmOpportunity::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'expert'));
  656 + break;
  657 +
654 658 case "comments_phrase":
655 659 $params[SearchFields_CrmOpportunity::FULLTEXT_COMMENT_CONTENT] = new DevblocksSearchCriteria(SearchFields_CrmOpportunity::FULLTEXT_COMMENT_CONTENT,DevblocksSearchCriteria::OPER_FULLTEXT,array($query,'phrase'));
656 660 break;
1  features/cerberusweb.crm/templates/crm/quick_search.tpl
@@ -7,5 +7,6 @@
7 7 <option value="title"{if $quick_search_type eq 'title'}selected{/if}>{$translate->_('crm.opportunity.name')|capitalize}</option>
8 8 <option value="comments_all"{if $quick_search_type eq 'comments_all'}selected{/if}>{$translate->_('mail.quick_search.comments_all')}</option>
9 9 <option value="comments_phrase"{if $quick_search_type eq 'comments_phrase'}selected{/if}>{$translate->_('mail.quick_search.comments_phrase')}</option>
  10 + <option value="comments_expert"{if $quick_search_type eq 'comments_expert'}selected{/if}>{$translate->_('mail.quick_search.comments_expert')}</option>
10 11 </select><input type="text" name="query" class="input_search" size="16"><button type="submit">{$translate->_('common.search_go')|lower}</button>
11 12 </form>

0 comments on commit e24a38b

Please sign in to comment.
Something went wrong with that request. Please try again.