[Vtigercrm-commits] [Vtiger development] #6636: CustomView getStdCriteriaByModule not working well
Vtiger development
vtiger-tickets at trac.vtiger.com
Tue Jun 23 09:13:17 GMT 2015
#6636: CustomView getStdCriteriaByModule not working well
----------------------------+-------------------------
Reporter: Luis.Chiang | Owner: developer
Type: Need More Info | Status: new
Priority: unassigned | Milestone: Unassigned
Component: vtigercrm | Version: 5.1.0
Severity: Medium | Resolution:
Keywords: |
----------------------------+-------------------------
Changes (by prasad):
* type: defect => Need More Info
* severity: => Medium
Old description:
> Hi,
>
> I do some personalizations to my vtiger, and I get a error that I can't
> create filters on date fields that are in some blocks.
>
> I guess the problem is in modules/CustomView/CustomView.php on the
> function getStdCriteriaByModule because it generates the following sql
> {{{
> (mysql): select * from vtiger_field inner join vtiger_tab on
> vtiger_tab.tabid = vtiger_field.tabid where vtiger_field.tabid=6 and
> vtiger_field.block in ('9','11','12','97','98','99,100,144') and
> (vtiger_field.uitype in (5,6,23) or vtiger_field.displaytype=2) and
> vtiger_field.presence in (0,2) order by vtiger_field.sequence
> }}}
> and these blocks '99,100,144' contains some date fields, and in these way
> the fields on that block doesn't appear. I guess the sql should be
> '99','100','144' ..
>
> I post these in the forum:
> http://forums.vtiger.com/viewtopic.php?p=104353#104353 But I'm nearly
> sure that is a bug.
>
> Here is the all sql output...:
>
> (mysql): SELECT presence FROM vtiger_tab WHERE name='Accounts'
> (mysql): select distinct block,vtiger_field.tabid,name,blocklabel from
> vtiger_field inner join vtiger_blocks on
> vtiger_blocks.blockid=vtiger_field.block inner join vtiger_tab on
> vtiger_tab.tabid=vtiger_field.tabid where displaytype != 3 and
> vtiger_tab.name in ('Accounts') and vtiger_field.presence in (0,2) order
> by block
> (mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
> vtiger_field.block in ('9') and vtiger_field.presence in (0,2) and
> vtiger_field.displaytype in (1,2,3) order by sequence
> (mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
> vtiger_field.block in ('11') and vtiger_field.presence in (0,2) and
> vtiger_field.displaytype in (1,2,3) order by sequence
> (mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
> vtiger_field.block in ('12') and vtiger_field.presence in (0,2) and
> vtiger_field.displaytype in (1,2,3) order by sequence
> (mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
> vtiger_field.block in ('97') and vtiger_field.presence in (0,2) and
> vtiger_field.displaytype in (1,2,3) order by sequence
> (mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
> vtiger_field.block in ('98') and vtiger_field.presence in (0,2) and
> vtiger_field.displaytype in (1,2,3) order by sequence
> (mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
> vtiger_field.block in ('99','100','144') and vtiger_field.presence in
> (0,2) and vtiger_field.displaytype in (1,2,3) order by sequence
> (mysql): select distinct block,vtiger_field.tabid,name,blocklabel from
> vtiger_field inner join vtiger_blocks on
> vtiger_blocks.blockid=vtiger_field.block inner join vtiger_tab on
> vtiger_tab.tabid=vtiger_field.tabid where displaytype != 3 and
> vtiger_tab.name in ('Accounts') and vtiger_field.presence in (0,2) order
> by block
> (mysql): select * from vtiger_field inner join vtiger_tab on
> vtiger_tab.tabid = vtiger_field.tabid where vtiger_field.tabid=6 and
> vtiger_field.block in ('9','11','12','97','98','99,100,144') and
> (vtiger_field.uitype in (5,6,23) or vtiger_field.displaytype=2) and
> vtiger_field.presence in (0,2) order by vtiger_field.sequence) and
> vtiger_field.presence in (0,2) order by vtiger_field.sequence
New description:
Hi,
I do some personalizations to my vtiger, and I get a error that I can't
create filters on date fields that are in some blocks.
I guess the problem is in modules/CustomView/CustomView.php on the
function getStdCriteriaByModule because it generates the following sql
{{{
(mysql): select * from vtiger_field inner join vtiger_tab on
vtiger_tab.tabid = vtiger_field.tabid where vtiger_field.tabid=6 and
vtiger_field.block in ('9','11','12','97','98','99,100,144') and
(vtiger_field.uitype in (5,6,23) or vtiger_field.displaytype=2) and
vtiger_field.presence in (0,2) order by vtiger_field.sequence
}}}
and these blocks '99,100,144' contains some date fields, and in these way
the fields on that block doesn't appear. I guess the sql should be
'99','100','144' ..
I post these in the forum:
http://forums.vtiger.com/viewtopic.php?p=104353#104353 But I'm nearly sure
that is a bug.
Here is the all sql output...:
(mysql): SELECT presence FROM vtiger_tab WHERE name='Accounts'
(mysql): select distinct block,vtiger_field.tabid,name,blocklabel from
vtiger_field inner join vtiger_blocks on
vtiger_blocks.blockid=vtiger_field.block inner join vtiger_tab on
vtiger_tab.tabid=vtiger_field.tabid where displaytype != 3 and
vtiger_tab.name in ('Accounts') and vtiger_field.presence in (0,2) order
by block
(mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
vtiger_field.block in ('9') and vtiger_field.presence in (0,2) and
vtiger_field.displaytype in (1,2,3) order by sequence
(mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
vtiger_field.block in ('11') and vtiger_field.presence in (0,2) and
vtiger_field.displaytype in (1,2,3) order by sequence
(mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
vtiger_field.block in ('12') and vtiger_field.presence in (0,2) and
vtiger_field.displaytype in (1,2,3) order by sequence
(mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
vtiger_field.block in ('97') and vtiger_field.presence in (0,2) and
vtiger_field.displaytype in (1,2,3) order by sequence
(mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
vtiger_field.block in ('98') and vtiger_field.presence in (0,2) and
vtiger_field.displaytype in (1,2,3) order by sequence
(mysql): select * from vtiger_field where vtiger_field.tabid in ('6') and
vtiger_field.block in ('99','100','144') and vtiger_field.presence in
(0,2) and vtiger_field.displaytype in (1,2,3) order by sequence
(mysql): select distinct block,vtiger_field.tabid,name,blocklabel from
vtiger_field inner join vtiger_blocks on
vtiger_blocks.blockid=vtiger_field.block inner join vtiger_tab on
vtiger_tab.tabid=vtiger_field.tabid where displaytype != 3 and
vtiger_tab.name in ('Accounts') and vtiger_field.presence in (0,2) order
by block
(mysql): select * from vtiger_field inner join vtiger_tab on
vtiger_tab.tabid = vtiger_field.tabid where vtiger_field.tabid=6 and
vtiger_field.block in ('9','11','12','97','98','99,100,144') and
(vtiger_field.uitype in (5,6,23) or vtiger_field.displaytype=2) and
vtiger_field.presence in (0,2) order by vtiger_field.sequence) and
vtiger_field.presence in (0,2) order by vtiger_field.sequence
--
Comment:
Need more information on the customization done - the issue could be
linked to it.
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/6636#comment:1>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM
More information about the vtigercrm-commits
mailing list