Skip to content
This repository was archived by the owner on May 10, 2025. It is now read-only.

Conversation

YatharthVyas
Copy link
Collaborator

@YatharthVyas YatharthVyas commented Jul 23, 2021

This is a substitute for Task 3. The aim of this PR is to incorporate Workflows in com_modules

Summary of Changes

  1. Copied the functions of Workflows from com_content to com_modules (and made the necessary changes)
  2. Modified the Installation SQL script
  3. Created a new menu for Modules Workflows (displayed in left sidebar of atum when module workflows are enabled)
  4. Workflow transitions now work
  5. Modules Workflows CRUD works
  6. Modules can be created and updated with workflow
  7. Added a field to select the workflow for a module
  8. When creating new modules you have to select a workflow and when you save, the default stage under this workflow_id is set as the initial stage of the module.
  9. When editing exiting modules, instead of the workflow_id field, the workflow transition field is shown and this works similar to com_content.
  10. Language constants for workflow dropdown are now loaded
  11. Update SQL script added
  12. Added the correspondent of ContentHelper:onPrepareForm to ModuleModel. This function adds the default workflow option to the workflow dropdown

Needs work:

  1. More documentation

Testing Instructions

After a fresh install:
1, Go to Modules -> Options -> Integrations and Enable Workflows
2. Test the transitions in modules view
3. Test CRUD for workflows, stages and transitions in Modules: Workflows

Expected result AFTER applying this Pull Request

Workflows implemented

Documentation Changes Required

Yes. Something on the lines of https://docs.joomla.org/Publishing_Workflow_Implementation#Implement_com_workflow_into_your_extension

@YatharthVyas
Copy link
Collaborator Author

workflow

Workflow transitions are now working

@YatharthVyas
Copy link
Collaborator Author

Newly Created Modules are saved and their associations are created in the database

workflow1

@richard67
Copy link
Collaborator

I've approved the SQL parts only, I did not much review on other things.

@richard67
Copy link
Collaborator

The duplicate queries in the update SQL I haven't noticed 😄 .

Copy link
Collaborator

@richard67 richard67 left a comment

Choose a reason for hiding this comment

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

Fix wrong quoting causing SQL syntax error on PostgreSQL.

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
@winniecarole
Copy link

It would be nice if workflow with the same name could not be added
image

Test CRUD for workflows, steps and transitions have been well implemented and are working gut

image

@YatharthVyas
Copy link
Collaborator Author

Thank you for testing @winniecarole

I like your suggestion for checking duplicate workflow names. I believe this change is related to Workflows as a whole and it should be addressed in a PR aiming for that. I will make sure to add this to my future roadmap :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants