Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSelect fields default to none selection in dashlet #6845

Open
wiatrp opened this issue Jan 26, 2019 · 1 comment
Open

MultiSelect fields default to none selection in dashlet #6845

wiatrp opened this issue Jan 26, 2019 · 1 comment
Labels
Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type:Bug Bugs within the core SuiteCRM codebase

Comments

@wiatrp
Copy link

wiatrp commented Jan 26, 2019

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 like if($widgetDef['type']=='enum' || $widgetDef['type']=='multienum'){ to also take into account multi select fields

Steps to Reproduce

  1. Create a multi select field for any module and add the field to the dashlet
  2. Go to your home page and open up that dashlet
  3. The field will default to "none"
  4. Unselect the field to be blank and save the search
  5. Open the dashlet up again and the field will default to "none"

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

  • SuiteCRM Version used: 7.10.12
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): chrome
  • Environment name and version (e.g. MySQL, PHP 7): php 7
  • Operating System and version (e.g Ubuntu 16.04): windows 10
@cameronblaikie cameronblaikie added Type:Bug Bugs within the core SuiteCRM codebase Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds labels Apr 4, 2019
@pstevens71
Copy link
Contributor

This is still an issue in 7.13.3. When you have a report and a multiselect field "one of" in the report filter definition, you cannot select more than one value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type:Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

3 participants