Skip to content

FOUR-13980 Fix Case title overlaps task name in saved searches #6158

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

Merged
merged 5 commits into from
Feb 6, 2024

Conversation

caleeli
Copy link
Contributor

@caleeli caleeli commented Feb 5, 2024

Issue & Reproduction Steps

The content of the case title column is stepping on the task name column in a save search

image

Solution

  • Fix the text trucation and enable always the text truncation for case title and task name.

image

How to Test

  • Configure the Case Title of a process (Put a large text).
  • Run the process
  • Go to the All requests default Saved Search, or create a new one
  • See the content of the case_title column

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:next
ci:deploy

@tokensPM
Copy link

tokensPM commented Feb 5, 2024

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

@@ -193,6 +193,8 @@ export default {
break;
case "case_title":
field.name = "__slot:case_title";
// eslint-disable-next-line no-param-reassign
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove commented code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is needed since it is a linter comment to enable add/set the property truncate in the parameter column.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line were removed, and are handled in SavedSearchController

this.tableHeaders = this.getColumns();
this.tableHeaders.forEach((column) => {
if (column.field === "case_title") {
// eslint-disable-next-line no-param-reassign
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove commented code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line were removed, and are handled in SavedSearchController

Copy link
Contributor

@gustavobascope gustavobascope left a comment

Choose a reason for hiding this comment

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

maybe this could truncate the text

savedsearch package
controller SavedSearchController.php
adjustColumns method

        case 'case_title':
                $this->adjustCommonColumns($column, 200, 'case_title', null, 'true', 'true');
                break;                    

@@ -332,7 +334,7 @@ export default {
let htmlString = '';
for (const task of value) {
htmlString += `
<div>
<div class="text-truncate">
Copy link
Contributor

Choose a reason for hiding this comment

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

you could add this case on the savedsearch package
controller SavedSearchController.php
adjustColumns method

            case 'case_title':
                    $this->adjustCommonColumns($column, 200, 'case_title', null, 'true', 'true');
                    break;                    

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Amazing thanks for the suggestion I added the code to the SavedSearchController PR #410.

But this change is needed, when a request has two or more active tasks the active_tasks column it will show two or more lines, like the following:

image

As you could see in the previous image, the ellipsis does not appear becasue of the use of <div> to render multiple lines of tasks.

This line of code adds a text-trucate to each active task div of the request to add the ellipsis like:

image

Copy link
Contributor

@julceslauhub julceslauhub left a comment

Choose a reason for hiding this comment

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

Approved

@tokensPM
Copy link

tokensPM commented Feb 6, 2024

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

Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

@tokensPM
Copy link

tokensPM commented Feb 6, 2024

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

@ryancooley ryancooley merged commit 156cf9d into next Feb 6, 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