salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.27k stars 2.03k forks source link

Workflow sets enum key and not label #10382

Open JackBuchanan opened 3 months ago

JackBuchanan commented 3 months ago

Issue

When a workflow creates or modifies a record and when the WF action is configured to set the field value to another when it is an enum it sets the key rather than the label

E.g. Field name -> Field -> Field name(Opportunity Name -> Field -> Opportunity Type)

Expected Behavior

Unless the target field is also an enum then the enum Label should be used rather than they key e.g. Opportunity Name -> Field -> Sales Stage Results in the opportunity name being set to "Closed Won"

Actual Behavior

Unless the target field is also an enum then the enum Label should be used rather than they key e.g. Opportunity Name -> Field -> Sales Stage Results in the opportunity name being set to "closed_won"

Possible Fix

Steps to Reproduce

  1. Create workflow
  2. Set WF to modify record using an enum
  3. See the workflow set the enum key to the value image

Context

Set incorrect value when workflow is executed

Your Environment

serhiisamko091184 commented 3 months ago

Hi @JackBuchanan

thanks for raising the issue!

Regards, Serhii