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

feat(edit-content) : Allowing Users to add separators between workflow actions #26390

Merged
merged 30 commits into from
Dec 13, 2023

Conversation

jcastro-dotcms
Copy link
Contributor

@jcastro-dotcms jcastro-dotcms commented Oct 6, 2023

Proposed Changes

🤖 Generated by Copilot at 6bdd0f6

This pull request adds a new feature to the workflow system, which allows creating separator actions that can be used to organize and group other actions in a workflow step. It also refactors and cleans up some of the existing code related to workflow actions, and adds a startup task and a database column to support JSONB metadata for actions. The main files affected are WorkflowAction, WorkflowActionForm, WorkflowFactoryImpl, WorkflowSQL, WorkflowHelper, WorkflowAPITest, view_steps_filtered.jsp, and Task231009AddMetadataColumnToWorkflowAction.

🤖 Generated by Copilot at 6bdd0f6

  • Add a new metadata field to the WorkflowAction class and its related classes, to store additional configuration properties for the action (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Add a new constant for the separator actionId, which is a special type of action that groups other actions in the UI, and a new method to create a separator action form in the WorkflowActionForm builder (link, link)
  • Refactor the save method in the WfActionAjax class, to use the WorkflowActionForm builder and the separator method to create a separator action form, and to use the ExceptionUtil class to get the error message from an exception (link)
  • Add a new method to save a separator action in the WfActionAjax class, by calling the save method with the separator actionId and the schemeId and stepId parameters (link)
  • Add a new script tag and a div element in the view_steps_filtered.jsp file, to define a function to add a separator action to a workflow step, and to display a button to call the function (link, link)
  • Reorder the parameters of the addWorkflowAction method calls in the WorkflowAPITest class, to match the new signature of the method that takes the nextStep and stepId parameters before the whoCanUse and schemeId parameters (link)
  • Add a new method to create a WorkflowAction with a subtractTwoNumbers name and a subtract actionlet class in the WorkflowAPITest class, for testing purposes (link)
  • Add a new test method that verifies that a WorkflowAction with a separator subtype can be created and retrieved, and that the separator is included in the available actions for a contentlet in the WorkflowAPITest class (link)
  • Update the javadoc of the saveAction method in the WorkflowHelper class, to include the user parameter and to clarify the behavior of the stepId parameter (link)
  • Improve the error logging and handling in the saveAction method in the WorkflowHelper class, by using the ExceptionUtil class to get the error message, and by including the actionId and actionName in the log message (link)
  • Remove the unused imports and queries from the WorkflowHelper, WorkflowFactoryImpl, WorkflowSQL, and WfActionAjax classes, to clean up the code and avoid confusion (link, link, link, link, link, link, link, link, link, link, link)
  • Reorder the imports for the WorkflowHelper, WorkflowFactoryImpl, and WfActionAjax classes, to follow the alphabetical order and the grouping by package (link, link, link)
  • Add the final modifier to the row parameter in the convertListToObjects method in the WorkflowFactoryImpl class, to follow the code style and avoid reassignment (link)
  • Add the metadata column to the workflow_action table in the postgres.sql script, to create the JSONB column in the database (link)
  • Add javadoc comments for the WorkflowSQL and WfActionAjax classes, to document their purpose and usage, and to mark the WfActionAjax class as deprecated for removal, since it is replaced by the REST endpoints (link, link)

Screenshot

Workflow Divider Button

@jcastro-dotcms jcastro-dotcms linked an issue Oct 6, 2023 that may be closed by this pull request
Copy link
Contributor

@jdotcms jdotcms left a comment

Choose a reason for hiding this comment

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

Very good job

@dotcms-sonarqube
Copy link

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Nov 12, 2023
Copy link

This PR was closed because it has been stalled with no activity.

@github-actions github-actions bot closed this Nov 19, 2023
@fmontes fmontes reopened this Dec 6, 2023
@jcastro-dotcms jcastro-dotcms marked this pull request as ready for review December 6, 2023 17:53
@github-actions github-actions bot removed the stale label Dec 7, 2023
@rjvelazco rjvelazco marked this pull request as draft December 12, 2023 15:19
@fmontes fmontes marked this pull request as ready for review December 12, 2023 18:20
Copy link

@fmontes fmontes changed the title feat(Workflows) : Allowing Users to add separators between actions inside a Workflow Step. feat(edit-content) : Allowing Users to add separators between workflow actions Dec 13, 2023
@fmontes fmontes added this pull request to the merge queue Dec 13, 2023
Merged via the queue into master with commit ba01ad9 Dec 13, 2023
37 checks passed
@fmontes fmontes deleted the issue-26389-create-separator-for-Workflow-Actions branch December 13, 2023 18:49
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.

Edit Content: Create a separator for Workflow Actions
5 participants