Open zorodude opened 5 years ago
Here's link to a discussion in forum about the issue.
https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/27484-select-one-of-in-workflow
Seems there is a limitation in DB Field. The table aow_conditions is set to varchar limit of 255 characters. The table should be changed to a text field which allows more characters. A dropdown with 20 or so values could easily max this out the way it's set up now as varchar field type.
It should be solved by changing file /modules/AOW_Conditions/vardefs.php https://github.com/salesagility/SuiteCRM/commit/07c88f3b0edb49c51b4ae60d180cb0ab5ea27cd2
lines 142 - 160 on variable value definitions:
'value' =>
array(
'required' => false,
'name' => 'value',
'vname' => 'LBL_VALUE',
'type' => 'varchar',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => false,
'reportable' => true,
'unified_search' => false,
'merge_filter' => 'disabled',
//'len' => '255',
'len' => '1000',
'size' => '20',
),
BTW. A similar issue exists on the reports module. When you want to report on multiple options and characters in conditions exceeds the 255 threshold. It could be solved by changing the length on file /modules/AOR_Conditions/vardefs.php, lines 156 -173 on on variable value definitions on a similar way to the proposed above.
https://github.com/salesagility/SuiteCRM/commit/7cd12c87c171932af4c72bf6725eedda3589368e
You have also to set the 'type' => 'text', and do a Quick Repair
'value' =>
array(
'required' => false,
'name' => 'value',
'vname' => 'LBL_VALUE',
'type' => 'text',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => false,
'reportable' => true,
'unified_search' => false,
'merge_filter' => 'disabled',
//'len' => '255',
'size' => '20',
),
Issue
When creating a condition for "Leads | Status | Equal To | One of " and where the "value" refers to a dropdown list, the total amount of selected items during editing get dropped / shortened when saving the workflow. Might be string related, since it's an inconsistent number of items that remain selected.
Expected Behavior
Selecting the full list of dropdown items from the "Status" field should result in the full selection appearing in the detail (non-editing) view, as well as being used for criteria to execute the workflow.
Actual Behavior
After saving the workflow, the list is truncated to a smaller number of items (in my case, anywhere from 9 to 17 items).
Steps to Reproduce
Context
As part of cleaning up historical data, but preserving it temporarily, I'm copying the value from the "Status" field to a custom field. The workflow looks at the selected value in the Status field, and copies it to a custom field as text field. The workflow works, but won't retain the fully selected items of the Status dropdown.
Here's the sample list of items in in the dropdown (note the first line is blank):
CSF09 DECLINE 0% Contacted 0% DeclinedCSF07 50% Requested_Info 75% Confirming Active Assigned Contacted Converted CPMC07Reg CSF08 Comp CSF08 DECLINE CSF08 Speaker CSF09 Registered Comp CSF10 Registered Delegate CSF10 Speaker Prospect CSF10 Sponsor CSF11 Confirmed Speaker CSF11 Confirmed Sponsor CSF11 Delegate - DECLINE CSF11 Registered Delegate CSF12 Comp CSF12 Comp - DECLINE CSF12 Comp Prospect CSF12 Confirmed Speaker CSF12 Registered Delegate CSF12 Speaker - DECLINE CSF12 Speaker Prospect CSF12 Sponsor - DECLINE CSF12 Sponsor Prospect CSF12_Delegate- DECLINE CSF13 Comp CSF13 Comp Prospect CSF13 Confirmed Speaker CSF13 Confirmed Sponsor CSF13 Delegate - DECLINE CSF13 Registered Delegate CSF13 Speaker Prospect CSF13 Sponsor - DECLINE CSF13 Sponsor Prospect CSF13_Speaker - DECLINE CSFX 2014 Comp - Confirmed CSFX 2014 Comp Decline CSFX 2014 Comp Prospect CSFX 2014 Registered Delegate CSFX 2014 Speaker - CONFIRMED CSFX 2014 Speaker - DECLINE CSFX 2014 Speaker Prospect CSFX 2014 Sponsor - CONFIRMED CSFX 2014 Sponsor - DECLINE CSFX2015 Comp - Declined CSFX2015 Comp Prospect CSFX2015 Delegate Confirmed CSFX2015 Delegate Declined CSFX2015 Speaker Prospect CSFX_2014 Delegate - DECLINE Dead DeclinedCPMC07 In Process Inactive New Qualified Recycled Unqualified
Your Environment