Language Change ? Pending

User tests: Successful: Unsuccessful:

avatar YatharthVyas
YatharthVyas
12 Aug 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)

avatar YatharthVyas YatharthVyas - open - 12 Aug 2021
avatar YatharthVyas YatharthVyas - change - 12 Aug 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Aug 2021
Category SQL Administration com_admin Postgresql com_content com_menus com_modules Language & Strings Installation Libraries
avatar YatharthVyas YatharthVyas - change - 12 Aug 2021
The description was changed
avatar YatharthVyas YatharthVyas - edited - 12 Aug 2021
avatar bembelimen
bembelimen - comment - 12 Aug 2021

Thanks for this PR.

avatar YatharthVyas YatharthVyas - change - 12 Aug 2021
Labels Added: Language Change ?
avatar brianteeman
brianteeman - comment - 12 Aug 2021

Will test once 4,0 is out of the way

avatar YatharthVyas YatharthVyas - change - 20 Aug 2021
Labels Added: ?
Removed: ?
avatar YatharthVyas YatharthVyas - change - 23 Sep 2021
Labels Added: ?
Removed: ?
avatar PhilETaylor
PhilETaylor - comment - 24 Dec 2021

This cannot be merged until the the PHP level issue with heredoc is fixed.

avatar PhilETaylor PhilETaylor - test_item - 24 Dec 2021 - Tested unsuccessfully
avatar PhilETaylor
PhilETaylor - comment - 24 Dec 2021

I have tested this item ? unsuccessfully on ab406a3

Not compatible with PHP 7.2 - see: https://github.com/joomla/joomla-cms/pull/35101/files#r775081165


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2022
Category SQL Administration com_admin Postgresql com_content com_menus com_modules Language & Strings Installation Libraries Unit Tests Repository Administration com_admin SQL Postgresql
avatar YatharthVyas
YatharthVyas - comment - 2 Apr 2022

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.

avatar richard67
richard67 - comment - 2 Apr 2022

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.

@YatharthVyas You can remove review requests after having reverted the rebase (or rebased back) and then using the cog icon near the reviewers list on github.

avatar YatharthVyas YatharthVyas - change - 2 Apr 2022
Title
[4.1] [GSoC 21] Feature - Implement Workflows for com_modules
[4.2] [GSoC 21] Feature - Implement Workflows for com_modules
avatar YatharthVyas YatharthVyas - edited - 2 Apr 2022
avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2022
Category SQL Administration com_admin Postgresql Unit Tests Repository Unit Tests SQL Administration com_admin Postgresql com_content com_menus com_modules Language & Strings Installation Libraries
avatar YatharthVyas YatharthVyas - change - 2 Apr 2022
Labels Added: ? ?
Removed: ?
avatar YatharthVyas
YatharthVyas - comment - 2 Apr 2022

Update: I have changed the base branch after discussing this with my mentors to 4.2-dev since being a new feature, this wont be going into 4.1

@richard67
Unfortunately, I'm still unable to remove the review requests. I dont know if I'm doing something wrong but the cog icon isnt visible for me

avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2022
Category SQL Administration com_admin Postgresql Unit Tests com_content com_menus com_modules Language & Strings Installation Libraries SQL Administration com_admin Postgresql com_content com_menus com_modules Language & Strings Installation Libraries
avatar YatharthVyas YatharthVyas - change - 2 Apr 2022
Labels Removed: ?
avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar HLeithner
HLeithner - comment - 2 May 2023

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

avatar HLeithner
HLeithner - comment - 30 Sep 2023

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

avatar rdeutz rdeutz - change - 22 Nov 2023
Title
[4.2] [GSoC 21] Feature - Implement Workflows for com_modules
[5.1] [GSoC 21] Feature - Implement Workflows for com_modules
avatar rdeutz rdeutz - edited - 22 Nov 2023
avatar HLeithner
HLeithner - comment - 24 Apr 2024

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

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
[5.1] [GSoC 21] Feature - Implement Workflows for com_modules
[5.2] [GSoC 21] Feature - Implement Workflows for com_modules
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar cybersalt cybersalt - test_item - 21 Aug 2024 - Tested unsuccessfully
avatar cybersalt
cybersalt - comment - 21 Aug 2024

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.

avatar fgsw
fgsw - comment - 2 Sep 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.

avatar HLeithner
HLeithner - comment - 2 Sep 2024

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

avatar HLeithner HLeithner - change - 2 Sep 2024
Title
[5.2] [GSoC 21] Feature - Implement Workflows for com_modules
[5.3] [GSoC 21] Feature - Implement Workflows for com_modules
avatar HLeithner HLeithner - edited - 2 Sep 2024

Add a Comment

Login with GitHub to post a comment