Skip to content

Observation/FOUR-12695: 35992 Screens in anonymous web entry tasks are not being translated#6137

Merged
ryancooley merged 1 commit intonextfrom
observation/FOUR-12695
Feb 1, 2024
Merged

Observation/FOUR-12695: 35992 Screens in anonymous web entry tasks are not being translated#6137
ryancooley merged 1 commit intonextfrom
observation/FOUR-12695

Conversation

@agustinbusso
Copy link
Copy Markdown
Contributor

@agustinbusso agustinbusso commented Feb 1, 2024

Issue & Reproduction Steps

  • Import attached process
  • Confirm Spanish translation is set for Step 1 and 2 screens
  • Click on web entry and copy URL
  • Task is an anonymous web entry one, no need to set users.
  • Open the URL in an Spanish browser (so ProcessMaker picks the language)
  • Submit screen

At this point you will see that although the screen in the web entry was correctly shown in Spanish (from the browser), the one in the task didn’t, English labels were shown.

Solution

  • Fix an issue searching the key in the array of languages.
  • Fix an issue validating there are not user (when user is not logged in, anonymous user is used instead)

Working video

Grabacion.de.pantalla.2024-02-01.a.la.s.10.46.13.mov

How to Test

  • Follow steps above
  • When a user is logged (or WE is authenticated) it should use the language configured in the user profile
  • When not logged (WE is anonymous) it should use the language configured in the browser

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

ci:deploy

@processmaker-sonarqube
Copy link
Copy Markdown

@eiresendez eiresendez self-requested a review February 1, 2024 14:10
Copy link
Copy Markdown
Contributor

@eiresendez eiresendez left a comment

Choose a reason for hiding this comment

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

By using array_key_exists proper checking is done within the Language::all array and avoiding errors related to anonymous users 👍

@tokensPM
Copy link
Copy Markdown

tokensPM commented Feb 1, 2024

QA server K8S was successfully deployed https://ci-ea32535f45.engk8s.processmaker.net

@ryancooley ryancooley merged commit 2267d30 into next Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants