Skip to content

Commit

Permalink
ドキュメントのリストでフォルダを条件に指定すると検索結果がゼロ件になる問題を修正 (#1088)
Browse files Browse the repository at this point in the history
Co-authored-by: Jun Matsuda <{ID}+{username}@users.noreply.github.com>
  • Loading branch information
junmt and Jun Matsuda authored Sep 4, 2024
1 parent cc9d0e0 commit e2bea43
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/QueryGenerator/EnhancedQueryGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,11 @@ public function getWhereClause() {
$columnSql = getSqlForNameInDisplayFormat(array('last_name'=>$columnSqlTable.'.last_name',
'first_name'=>$columnSqlTable.'.first_name'),'Users');
} else if(in_array('DocumentFolders', $moduleList)) {
$columnSql = "vtiger_attachmentsfolder".$fieldName.".foldername";
if($conditionInfo['operator'] == 'e' || $conditionInfo['operator'] == 'n') {
$columnSql = "vtiger_attachmentsfolder".$fieldName.".folderid";
} else {
$columnSql = "vtiger_attachmentsfolder".$fieldName.".foldername";
}
} else if(in_array('Currency', $moduleList)) {
$columnSql = "vtiger_currency_info$parentReferenceField$fieldName.currency_name";
if($fieldName == 'currency_id' && is_numeric($conditionInfo['value'])){
Expand Down
6 changes: 6 additions & 0 deletions layouts/v7/modules/Vtiger/resources/Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,12 @@ Vtiger_Field_Js('Vtiger_Documentsfolder_Field_Js',{},{
* @return - select element and chosen element
*/
getUi : function() {
// リストの条件によって表示を変える
if(this.get('comparatorElementVal') != 'e' && this.get('comparatorElementVal') != 'n') {
var html = '<input class="inputElement" type="text" name="'+ this.getName() +'" value="'+ this.getValue() + '" />';
return jQuery(html);
}

//added class inlinewidth
var html = '<select class="select2 inputElement inlinewidth" name="'+ this.getName() +'" id="field_'+this.getModuleName()+'_'+this.getName()+'">';
var pickListValues = this.getPickListValues();
Expand Down

0 comments on commit e2bea43

Please sign in to comment.