MultiSelect fields default to none selection in dashlet #6845
Labels
Priority:Important
Issues & PRs that are important; broken functions, errors - there are workarounds
Type:Bug
Bugs within the core SuiteCRM codebase
Issue
In a dashlet edit view, when modifying the search constraints, if you have a multi select field with no value saved then the value will always default to "none" unless a value was previously saved in the search.
Expected Behavior
If I do not have a value for a multi select field saved, that field should remain blank when opening the edit view for a dashlet.
Actual Behavior
If no value is saved to the search constraints for a multi select, the value will default to none when you open the dashlet up to edit the search
Possible Fix
In
DashletGeneric.php
starting on line 267 there is code that prevents this for dropdowns (enum field). The if statement can be modified to look likeif($widgetDef['type']=='enum' || $widgetDef['type']=='multienum'){
to also take into account multi select fieldsSteps to Reproduce
Context
Having a multi select field saved with no values means the search will bring back records with any value in that field. But people are opening up the dashlet to modify another part of the search and the multi select fields are then being changed to "none" which alters the search into something the user does not want and typically without them knowing what happened.
Your Environment
The text was updated successfully, but these errors were encountered: