Skip to content

Conversation

YatharthVyas
Copy link
Contributor

@YatharthVyas YatharthVyas commented Aug 12, 2021

Project Repo PR: joomla-projects/gsoc21_core-enhancements#10

Summary of Changes

Access

  • The corresponding access.xml actions have been added.

Articles Model

  • The getListQuery() method joins the old query with workflow_associations to also consider the workflow stages that belong to com_content.articles only.

SQL Changes:

  • The following have been added to the Database Tables:
    • 1 new workflow: COM_WORKFLOW_BASIC_WORKFLOW_MODULES
    • 1 new stage: COM_WORKFLOW_BASIC_STAGE
    • 3 new transitions: Publish, Unpublish, and Trash
  • Workflow Associations have been created for all existing modules via an update script / a query during Installation.

Introduce a new Backend Menu Item

  • A new menu item for Modules: Workflows to execute CRUD for com_modules

Option to Enable Workflow Integration

  • This can be toggled from Global Configuration

Searchtools Filtering

  • Option to filter modules via their stage

ModulesComponent.php

  • Added necessary functions that are used by Workflow Plugins (Workflows, Featuring and Publishing)

Module Model

  • The get query now takes into account the workflow stage associated with each module.
  • Added Workflow before and after Save events
  • Added a function to get the initial stage for a module (default workflow and default stage)
  • Added a query to create workflow association while duplicating modules
  • Added a function that prepares the workflow field

Modules Model

  • Join the query with workflow associations
  • Add a filterForm function to filter based on workflow stage

Modules Template:

  • Added workflows column to the table
  • This column is conditionally rendered when workflows are enabled
  • Added workflows field to default batch body

The Flow:

  1. 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.
  2. When editing exiting modules, the workflow transition field is shown instead of the workflow_id field, which works similarly to com_content.

New Modules: Select Workflow

(Permanent similar to workflow assignment for com_content)

image

Edit Existing Modules: Transition Field

image

Testing Instructions

After a fresh install:
1, Go to Modules (Site or Admin) -> Options -> Integrations -> Enable Workflows
2. Test the transitions in modules view
3. Test CRUD for workflows, stages, and transitions in Modules: Workflows
4. Test Batch and Duplicate

Expected result AFTER applying this Pull Request

Workflows are integrated into Modules and work as expected.

Joomla.Workflows.for.com_modules.1.mp4

Documentation Changes Required

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

Mentors

@chmst @nibra @bembelimen
(And special thanks to @richard67)

@bembelimen
Copy link
Contributor

Thanks for this PR.

@brianteeman
Copy link
Contributor

Will test once 4,0 is out of the way

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@YatharthVyas YatharthVyas force-pushed the feature-module-workflow branch from cccdf8e to 8b0555a Compare April 2, 2022 12:36
@joomla-cms-bot joomla-cms-bot added Unit/System Tests and removed Language Change This is for Translators labels Apr 2, 2022
@YatharthVyas
Copy link
Contributor Author

Oops, I rebased to 4.2-dev instead of 4.1
I'll revert and fix this.
Also, sorry for the review requests. I'm unable to remove them from my end.

@HLeithner HLeithner changed the base branch from 5.0-dev to 5.1-dev September 30, 2023 22:52
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.1-dev.

@rdeutz rdeutz changed the title [4.2] [GSoC 21] Feature - Implement Workflows for com_modules [5.1] [GSoC 21] Feature - Implement Workflows for com_modules Nov 22, 2023
@rdeutz rdeutz removed the PR-5.0-dev label Nov 29, 2023
@HLeithner HLeithner changed the base branch from 5.1-dev to 5.2-dev April 24, 2024 09:10
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.2-dev.

@HLeithner HLeithner changed the title [5.1] [GSoC 21] Feature - Implement Workflows for com_modules [5.2] [GSoC 21] Feature - Implement Workflows for com_modules Apr 24, 2024
@cybersalt
Copy link

I have tested this item 🔴 unsuccessfully on 1c3ad76

Applying the patch gave me a 500 error after saving and closing the module options. I am doing this on a live stream one of my viewers said "soo it look like the patch is out of date and needs to be updated before it's ready to test again."

Layout default_batch_footer not found.
Call Stack

Function Location

1 () JROOT/libraries/src/MVC/View/HtmlView.php:425
2 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/administrator/components/com_modules/tmpl/modules/default.php:284
3 include() JROOT/libraries/src/MVC/View/HtmlView.php:416
4 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:204


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35101.

@ghost
Copy link

ghost commented Sep 2, 2024

@cybersalt At the end of the page you find this information:
0
This means that the pull request can not be test until the conflicts are solved and the failed test is expected why it should be changed to "not tested" at the issue tracker.

@ghost ghost mentioned this pull request Sep 2, 2024
@HLeithner HLeithner changed the base branch from 5.2-dev to 5.3-dev September 2, 2024 08:54
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.3-dev.

@HLeithner HLeithner changed the title [5.2] [GSoC 21] Feature - Implement Workflows for com_modules [5.3] [GSoC 21] Feature - Implement Workflows for com_modules Sep 2, 2024
@Hackwar Hackwar removed the PR-5.2-dev label Sep 3, 2024
@HLeithner HLeithner changed the base branch from 5.3-dev to 6.0-dev March 4, 2025 17:23
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 6.0-dev.

@HLeithner HLeithner changed the title [5.3] [GSoC 21] Feature - Implement Workflows for com_modules [6.0] [GSoC 21] Feature - Implement Workflows for com_modules Mar 4, 2025
@rdeutz rdeutz removed the PR-5.3-dev label Mar 5, 2025
@exlemor exlemor moved this to Abandoned in PR Cleanup May 10, 2025
@HLeithner HLeithner changed the base branch from 6.0-dev to 6.1-dev August 31, 2025 12:01
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 6.1-dev.

@HLeithner HLeithner changed the title [6.0] [GSoC 21] Feature - Implement Workflows for com_modules [6.1] [GSoC 21] Feature - Implement Workflows for com_modules Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Abandoned

Development

Successfully merging this pull request may close these issues.