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

Workflow sets enum key and not label #10382

Open
JackBuchanan opened this issue Mar 21, 2024 · 1 comment
Open

Workflow sets enum key and not label #10382

JackBuchanan opened this issue Mar 21, 2024 · 1 comment
Labels
Area: Workflow Issues & PRs related to all things regarding workflow Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds Severity: Minor Function rarely used and has no impact Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type: Bug Bugs within the core SuiteCRM codebase

Comments

@JackBuchanan
Copy link
Contributor

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
JackBuchanan added a commit to JackBuchanan/SuiteCRM that referenced this issue Mar 21, 2024
…ting values

Update how enums fields are handled when setting workflow values
@serhiisamko091184 serhiisamko091184 added Type: Bug Bugs within the core SuiteCRM codebase Area: Workflow Issues & PRs related to all things regarding workflow Severity: Minor Function rarely used and has no impact Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds labels Mar 21, 2024
@serhiisamko091184
Copy link
Contributor

Hi @JackBuchanan

thanks for raising the issue!

Regards,
Serhii

@serhiisamko091184 serhiisamko091184 added the Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution label Mar 21, 2024
JackBuchanan added a commit to JackBuchanan/SuiteCRM that referenced this issue Apr 2, 2024
…ting values

Update how enums fields are handled when setting workflow values
JackBuchanan added a commit to JackBuchanan/SuiteCRM that referenced this issue Apr 2, 2024
…ting values

Update how enums fields are handled when setting workflow values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Workflow Issues & PRs related to all things regarding workflow Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds Severity: Minor Function rarely used and has no impact Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

2 participants