salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world

Home Page:https://www.suitecrm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Workflow sets enum key and not label

JackBuchanan opened this issue · comments

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

  • SuiteCRM Version used: 7.14.3
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Chrome
  • Environment name and version (e.g. MySQL, PHP 7): MySQL, PHP 8.2
  • Operating System and version (e.g Ubuntu 16.04): 20.04

Hi @JackBuchanan

thanks for raising the issue!

Regards,
Serhii