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

Hotfix - Flujos de trabajo - Error en fórmula del cálculo de mes #49

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

ainaraRT
Copy link
Collaborator

@ainaraRT ainaraRT commented Jan 10, 2024

Desarrollo del issue
Al crear un flujo de trabajo para que calcule el mes, con ceros a la izquierda, de un campo fecha, devuelve el mes sin dichos ceros.

Solución implementada de salesagility#10112:
Este código recorre en iteración una lista de fórmulas, calcula sus valores y los establece en los campos apropiados del objeto bean. Garantizando que los valores numéricos se almacenen en el tipo de datos correcto.

Pruebas

  1. Crear un FdT
  • Módulo de Flujo de Trabajo: Personas
  • Ejecutar en: Nuevos registros
  • Ejecutar: Al guardar
  1. Acción: Calcular campos
  • Parámetros ->Fecha de nacimiento{P0}
  • Fórmulas-> Descripción {date(m;{P0})}
  1. Crear una nueva persona rellenando el campo Fecha de nacimiento
  2. Comprobar que en descripción se ha guardado el valor del mes con el cero a la izquierda.

@ainaraRT ainaraRT added bug Something isn't working Flujos de trabajo General labels Jan 10, 2024
@ainaraRT ainaraRT self-assigned this Jan 10, 2024
Copy link

github-actions bot commented Jan 10, 2024

Actions executed at: 2024-01-18 09:03:43.

@AlbertoSTIC AlbertoSTIC requested review from AlbertoSTIC, PaulaaSTIC and jordiSTIC and removed request for juanSTIC, jordiSTIC and AlbertoSTIC January 11, 2024 09:39
jordiSTIC
jordiSTIC previously approved these changes Jan 17, 2024
Copy link
Collaborator

@jordiSTIC jordiSTIC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(A)Probado

Copy link
Collaborator

@PaulaaSTIC PaulaaSTIC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En el código anterior, también se tenían en cuenta los tipos siguientes: 'double', 'uint', 'ulong', 'long', 'short' y 'tinyint'. Creo que deberían incluirse.

if (in_array($fieldType, ['float', 'decimal', 'currency', 'double', 'uint', 'ulong', 'long', 'short', 'tinyint'])) {

Copy link
Collaborator

@jordiSTIC jordiSTIC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(A)Probado

Copy link
Collaborator

@PaulaaSTIC PaulaaSTIC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(A)probado

@AlbertoSTIC AlbertoSTIC merged commit 1e6540a into develop Jan 18, 2024
1 check failed
@AlbertoSTIC AlbertoSTIC deleted the bug/FormulaWorkflowErrorCalcuteMonth branch January 18, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Flujos de trabajo General
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incidencia - Flujos de trabajo - Error en fórmula para calcular mes
4 participants