I need to create a new operator in Sugar, is that possible??
I need to create a new operator in Sugar, is that possible??
As Andre suggested, there is no upgrade safe route, and mostly it's not a good idea to spend time customizing it.
But - if you really realllyy need it - there is an non-upgrade safe route and I can give a few suggestions on how we did it, which is not as easy or straightforward as other Sugar customizations.
1. The main file in the UI that you're looking for is include/javascript/reports.js
-
addFilterQualify
function - this is where the operators are added.addFilterInput
to define how it's displayed.saveFilters
, generate the filter definition that you need from the fields.2. Implement the query generation part for your filter in modules/Reports/Report.php
- look out for register_field_for_query
or filtersIterate
functions.
As Andre suggested, there is no upgrade safe route, and mostly it's not a good idea to spend time customizing it.
But - if you really realllyy need it - there is an non-upgrade safe route and I can give a few suggestions on how we did it, which is not as easy or straightforward as other Sugar customizations.
1. The main file in the UI that you're looking for is include/javascript/reports.js
-
addFilterQualify
function - this is where the operators are added.addFilterInput
to define how it's displayed.saveFilters
, generate the filter definition that you need from the fields.2. Implement the query generation part for your filter in modules/Reports/Report.php
- look out for register_field_for_query
or filtersIterate
functions.