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

Receive related parameters of type dynamicenum in workflow formulas #9750

Closed
SinergiaCRM opened this issue Sep 5, 2022 · 0 comments
Closed
Labels
Area: Workflow Issues & PRs related to all things regarding workflow Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds 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

@SinergiaCRM
Copy link
Contributor

SinergiaCRM commented Sep 5, 2022

Issue

In a Calculate Field action in a workflow that uses a relation parameter of type DynamicEnum, its formatted value is not received correctly.

Expected Behavior

It should display the formatted value

Actual Behavior

Instead of showing the formatted value, it shows {R0}

Possible Fix

Change line 281 of the resolveRelationParameters() method of the modules/AOW_Actions/actions/actionComputeField.php file:

if ($dataType == 'enum')

by:

if ($datatype == 'enum' || $datatype == 'dynamic enum')

Steps to Reproduce

  1. Create a field of type dynamicenum in the Organizations module and add it to the editing and detail view. :
    Name: subtype
    Type: dynamicenum
    Parent DropDown: account_type
    Add DropDown List: subtype_list
    Values:
  • Item Name: Analyst_1 - Display Label: 1
  • Item Name: Analyst_2 - Display Label: 2
  • Item Name: Analyst_3 - Display Label: 3
  1. Create an organization with Type = Analyst and subtype = 1
  2. Create an Accounts-based workflow
    Run:Always
    Run On: All records
    Action: Calculate Fields
    Relationship Parameters:
  • Accounts: Member Of
  • account_type (Formatted value)
  • subtype (Formatted value)

Formulas:

  • Description
  • {R0} - {R1}
  1. Create another organization and indicate that it is a member of the organization created in point 2
  2. Check that the descriptión of the second organization contains the formatted value of the account_type field but does not contain the formatted value of the subtype field

Your Environment

SuiteCRM Version used: Version 7.12.6
Browser name and version: Versión 100.0.4896.88 (Build oficial) (64 bit
Environment name and version: MySQL, PHP 7
Operating System and version: Ubuntu 20.04

ManuSinergiaCRM pushed a commit to SinergiaTIC/SuiteCRM that referenced this issue Sep 5, 2022
@johnM2401 johnM2401 added Type: Bug Bugs within the core SuiteCRM codebase Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Area: Workflow Issues & PRs related to all things regarding workflow labels Sep 7, 2022
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:Important Issues & PRs that are important; broken functions, errors - there are workarounds 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