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

[4.0] Workflow enhancement #29235

Merged
merged 110 commits into from
May 29, 2020
Merged
Show file tree
Hide file tree
Changes from 94 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
f7db0e2
Remove condition from workflow component (#52)
bembelimen Mar 14, 2020
5a32050
Workflow remove (#51)
HLeithner Mar 14, 2020
26e40ea
Workflow remove (#53)
HLeithner Mar 24, 2020
54d0f94
Remove condition from com_content (#54)
bembelimen Mar 24, 2020
d6d9e6c
Workflow v3 content (#55)
bembelimen Mar 25, 2020
3cee575
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen Apr 3, 2020
11a029b
Remove workflow from com_content (#56)
bembelimen Apr 18, 2020
68ceb20
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen Apr 18, 2020
be6b633
Fix batch (#57)
bembelimen Apr 21, 2020
182d45e
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen Apr 21, 2020
b520b5a
Rename com_content context to "com_content.article" (#60)
bembelimen Apr 21, 2020
479e4d7
Fix broken permission check for workflows
bembelimen Apr 21, 2020
12ca6b2
Workflow v3 transitions (#61)
bembelimen Apr 21, 2020
25c42a4
Remove stage filter when workflow is disabled
bembelimen Apr 21, 2020
ceabd4c
Allow same and circle transitions again (#62)
bembelimen Apr 22, 2020
ac62106
Calculate the ordering number in store (#65)
chmst Apr 23, 2020
6c4ee9f
Workflow v3 transitions (#67)
bembelimen Apr 24, 2020
2a9f2d5
Add missing publishing plugin xml
bembelimen Apr 25, 2020
38ee874
Kill publish approaches with an exception when workflow is enabled
bembelimen Apr 26, 2020
e8dfbb4
Implement onBeforeDisplay plugin trigger (#72)
bembelimen Apr 26, 2020
c2cb996
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen Apr 26, 2020
f6fbe8f
Fix notice in article (#68)
chmst Apr 26, 2020
5d7ef5a
Fix #70 (#71)
chmst Apr 26, 2020
ffdb21d
Codestyle fixes (#73)
Hackwar Apr 27, 2020
e403ade
Renaming workflows_enable parameter to workflow_enabled (#74)
Hackwar Apr 27, 2020
fdacb31
Remove unnecessary plugin type loader
bembelimen Apr 28, 2020
c40d71b
Merge branch 'workflow-v3' of github.com:bembelimen/joomla-cms into w…
bembelimen Apr 28, 2020
d9266b2
Fix transition execution check
bembelimen Apr 29, 2020
64ab83d
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen Apr 29, 2020
dee4961
Fix wrong context when deleting a workflow
bembelimen Apr 29, 2020
10b447d
Remove unnecessary delete method in workflow
bembelimen Apr 29, 2020
914b93b
Redirect after featue/unfeature workflow (#75)
chmst Apr 30, 2020
d010c6e
Fixing Codestyle (#77)
Hackwar Apr 30, 2020
8876096
Add missing namespace for database parameter type
bembelimen Apr 30, 2020
67b544e
Merge branch 'workflow-v3' of github.com:bembelimen/joomla-cms into w…
bembelimen Apr 30, 2020
471fbe2
Display publishing dropdown as text only in item form view
bembelimen May 1, 2020
b4a2011
Reset workflow if batch copy is called
bembelimen May 1, 2020
6fafbf8
Fix notice in transition view
bembelimen May 1, 2020
1afb670
Workflow rename transition options to actions (#79)
HLeithner May 1, 2020
b1bca7f
Fix sample data for new workflow
bembelimen May 2, 2020
5460597
Merge branch 'workflow-v3' of github.com:bembelimen/joomla-cms into w…
bembelimen May 2, 2020
f9ef752
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen May 2, 2020
b424193
Fixing system tests and codestyle (#80)
Hackwar May 2, 2020
d36a2ee
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen May 2, 2020
686fa0d
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen May 6, 2020
da2dd21
Fix redirect after warning (#83)
chmst May 6, 2020
bc9e5d6
Fixing system tests (#88)
Hackwar May 6, 2020
0238c94
Add featuring plugin (#84)
HLeithner May 6, 2020
a52fe09
Add check, if workflow plugins should be executed
bembelimen May 6, 2020
5da7511
Rename joomla.state to core.state (#89)
HLeithner May 6, 2020
18e4f7f
Refactor stages transitions (#93)
bembelimen May 10, 2020
cd627e8
Rename publishing action field
bembelimen May 10, 2020
4353029
Fix disabled options in transition form
bembelimen May 10, 2020
c0d12ce
Add workflow plugin trait (#94)
HLeithner May 10, 2020
4ec424e
Load correct XML path for actions
bembelimen May 10, 2020
4b933ae
Add Publish & Feature as Transition
bembelimen May 10, 2020
03ab576
Fix workflow ID loading for new transitions
bembelimen May 10, 2020
73e6388
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen May 10, 2020
8791711
Use old pseudo-nulldates in 4.0.0-2018-05-15.sql (#96)
richard67 May 11, 2020
f74e1c1
Fixing codestyle (#97)
Hackwar May 12, 2020
667e90a
Fix broken transition selection for articles view
bembelimen May 18, 2020
3f29224
Remove core workflow protection (#98)
bembelimen May 19, 2020
c924085
New Plugin workflow_notification (#92)
chmst May 22, 2020
9deef12
Remove author notification
bembelimen May 22, 2020
df6a18b
Separate transition dropdown in articles list view (#102)
bembelimen May 23, 2020
87e2bcf
Fix broken DB calls
bembelimen May 23, 2020
5a18ed1
Rename default workflow/stage to "basic"
bembelimen May 23, 2020
28e7aa7
fix ordering workflows (#101)
chmst May 23, 2020
c72060b
[WIP] Add options per section and functionality and use new event sys…
HLeithner May 25, 2020
13e44cc
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen May 25, 2020
831efc0
cs (#103)
HLeithner May 25, 2020
bf43a61
Add context selector for workflow (#104)
bembelimen May 26, 2020
3bc6d86
Fix update sql for extensions table (#105)
richard67 May 26, 2020
396e25e
Add a11y features to the transition button
bembelimen May 26, 2020
3cf5208
Remove component workflow options (#107)
HLeithner May 26, 2020
18b84a7
Fix broken mobile headline in articles list
bembelimen May 26, 2020
a66a715
Merge branch 'workflow-v3' of github.com:bembelimen/joomla-cms into w…
bembelimen May 26, 2020
38c0cb2
Improve notification description text
bembelimen May 26, 2020
dab457d
Change text (#109)
chmst May 26, 2020
fb859c1
Code style (#111)
brianteeman May 26, 2020
85b392d
Fix missing import in access exception (#110)
wilsonge May 26, 2020
309cc80
Fix wrong language key
bembelimen May 26, 2020
5084cb6
Merge branch 'workflow-v3' of github.com:bembelimen/joomla-cms into w…
bembelimen May 26, 2020
1ca624c
Add Workflow Component Sections Field (#108)
HLeithner May 26, 2020
8bb999c
Hide workflow menu item if workflow is disabled for the extension
bembelimen May 26, 2020
6766845
Merge branch 'workflow-v3' of github.com:bembelimen/joomla-cms into w…
bembelimen May 26, 2020
a3bf93b
George broke it (#112)
brianteeman May 26, 2020
596bc11
Fix White/Blacklist (#113)
HLeithner May 26, 2020
a70f1ad
Fix White/Blacklist (#114)
HLeithner May 26, 2020
b53334a
Improve notification plugin languages
bembelimen May 26, 2020
375af77
Merge branch 'workflow-v3' of github.com:bembelimen/joomla-cms into w…
bembelimen May 26, 2020
df7a8e2
Fix codestyle
bembelimen May 26, 2020
17caeaf
[WF] alpha sort language strings (#115)
brianteeman May 27, 2020
de6f4f9
[wf] column headers on mobile (#116)
brianteeman May 27, 2020
2241a3e
Use direct queryselector for workflow JS
bembelimen May 27, 2020
0f84ad4
Merge branch 'workflow-v3' of github.com:bembelimen/joomla-cms into w…
bembelimen May 27, 2020
d10177f
Remove locked column of extensions table from update sql - sorry was …
richard67 May 27, 2020
edf2af8
Fix filter stages fpr atricles (#118)
chmst May 27, 2020
d15a27f
Change workflow enable parameter (#119)
bembelimen May 27, 2020
6dcbeb1
Merge branch '4.0-dev' into workflow-v3
wilsonge May 28, 2020
89712e1
Only save feature flag if not managed by workflow
HLeithner May 28, 2020
9cbade7
Fix doc block - return (#120)
chmst May 28, 2020
c749e56
cs (#121)
HLeithner May 28, 2020
5b4fc0e
Fix sample data
bembelimen May 29, 2020
3712f19
Fix wrong state in sample data
bembelimen May 29, 2020
bc6c53c
Make Stage in filter translatable
bembelimen May 29, 2020
781fab1
Remove stages filter in articles when workflow is disabled
bembelimen May 29, 2020
fbf3c12
Update administrator/components/com_content/src/Model/ArticlesModel.php
bembelimen May 29, 2020
a5f683d
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
bembelimen May 29, 2020
bd5e237
Try and fix tests
wilsonge May 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,18 @@ plugins/system/webauthn/* @nikosdion
media/plg_system_webauthn/* @nikosdion
language/administrator/en-GB/en-GB.plg_system_webauthn.ini @nikosdion
language/administrator/en-GB/en-GB.plg_system_webauthn.sys.ini @nikosdion

# Workflow
administrator/components/com_workflow/* @bembelimen @hleithner
administrator/language/en-GB/com_workflow.ini @bembelimen @hleithner
administrator/language/en-GB/com_workflow.sys.ini @bembelimen @hleithner
administrator/language/en-GB/plg_workflow_publishing.ini @bembelimen @hleithner
administrator/language/en-GB/plg_workflow_publishing.sys.ini @bembelimen @hleithner
libraries/src/Form/Field/TransitionField.php @bembelimen @hleithner
libraries/src/Form/Field/Workflow* @bembelimen @hleithner
libraries/src/HTML/Helpers/Workflow* @bembelimen @hleithner
libraries/src/MVC/Model/Workflow* @bembelimen @hleithner
libraries/src/MVC/Model/Workflow* @bembelimen @hleithner
libraries/src/Workflow/* @bembelimen @hleithner
build/media_source/com_workflow/* @bembelimen @hleithner
plugins/workflow/* @bembelimen @hleithner
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ CREATE TABLE IF NOT EXISTS `#__workflows` (
`description` text NOT NULL,
`extension` varchar(50) NOT NULL,
`default` tinyint(1) NOT NULL DEFAULT 0,
`core` tinyint(1) NOT NULL DEFAULT 0,
`ordering` int(11) NOT NULL DEFAULT 0,
`created` datetime NOT NULL,
`created_by` int(10) NOT NULL DEFAULT 0,
Expand All @@ -34,8 +33,8 @@ CREATE TABLE IF NOT EXISTS `#__workflows` (
-- Dumping data for table `#__workflows`
--

INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `core`,`ordering`, `created`, `created_by`, `modified`, `modified_by`, `checked_out_time`, `checked_out`) VALUES
(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, NULL, 0);
INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `ordering`, `created`, `created_by`, `modified`, `modified_by`, `checked_out_time`, `checked_out`) VALUES
(1, 0, 1, 'COM_WORKFLOW_BASIC_WORKFLOW', '', 'com_content.article', 1, 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, NULL, 0);

--
-- Table structure for table `#__workflow_associations`
Expand Down Expand Up @@ -64,7 +63,6 @@ CREATE TABLE IF NOT EXISTS `#__workflow_stages` (
`published` tinyint(1) NOT NULL DEFAULT 0,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`condition` int(10) DEFAULT 0,
`default` tinyint(1) NOT NULL DEFAULT 0,
`checked_out_time` datetime,
`checked_out` int(10) NOT NULL DEFAULT 0,
Expand All @@ -80,11 +78,8 @@ CREATE TABLE IF NOT EXISTS `#__workflow_stages` (
-- Dumping data for table `#__workflow_stages`
--

INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `condition`, `default`, `checked_out_time`, `checked_out`) VALUES
(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 1, NULL, 0),
(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 0, NULL, 0),
(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0, NULL, 0),
(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0, NULL, 0);
INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `default`, `checked_out_time`, `checked_out`) VALUES
(1, 0, 1, 1, 1, 'COM_WORKFLOW_BASIC_STAGE', '', 1, NULL, 0);

--
-- Table structure for table `#__workflow_transitions`
Expand All @@ -100,6 +95,7 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transitions` (
`description` text NOT NULL,
`from_stage_id` int(10) NOT NULL,
`to_stage_id` int(10) NOT NULL,
`options` text NOT NULL,
`checked_out_time` datetime,
`checked_out` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
Expand All @@ -115,21 +111,31 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transitions` (
-- Dumping data for table `#__workflow_transitions`
--

INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`, `checked_out_time`, `checked_out`) VALUES
(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, NULL, 0),
(2, 0, 1, 2, 1, 'Publish', '', -1, 2, NULL, 0),
(3, 0, 1, 3, 1, 'Trash', '', -1, 3, NULL, 0),
(4, 0, 1, 4, 1, 'Archive', '', -1, 4, NULL, 0);
INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`, `options`, `checked_out_time`, `checked_out`) VALUES
(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, '{"publishing":"0"}', NULL, 0),
(2, 0, 1, 2, 1, 'Publish', '', -1, 1, '{"publishing":"1"}', NULL, 0),
(3, 0, 1, 3, 1, 'Trash', '', -1, 1, '{"publishing":"-2"}', NULL, 0),
(4, 0, 1, 4, 1, 'Archive', '', -1, 1, '{"publishing":"2"}', NULL, 0),
(5, 0, 1, 5, 1, 'Feature', '', -1, 1, '{"featuring":"1"}', NULL, 0),
(6, 0, 1, 6, 1, 'Unfeature', '', -1, 1, '{"featuring":"0"}', NULL, 0),
(7, 0, 1, 7, 1, 'Publish & Feature', '', -1, 1, '{"publishing":"1","featuring":"1"}', NULL, 0);

--
-- Creating extension entry
--
-- Note that the old pseudo null dates have to be used for the `checked_out_time`
-- column because the conversion to real null dates will be done with a later
-- update SQL script.
--

INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0);
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 1, 1, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'plg_workflow_publishing', 'plugin', 'publishing', 'workflow', 0, 1, 1, 0, 1, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'plg_workflow_featuring', 'plugin', 'featuring', 'workflow', 0, 1, 1, 0, 1, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'plg_workflow_notification', 'plugin', 'notification', 'workflow', 0, 1, 1, 0, 1, '', '{}', 0, '0000-00-00 00:00:00', 0, 0);

--
-- Creating Associations for existing content
--
INSERT INTO `#__workflow_associations` (`item_id`, `stage_id`, `extension`)
SELECT `id`, CASE WHEN `state` = -2 THEN 3 WHEN `state` = 0 THEN 1 WHEN `state` = 2 THEN 4 ELSE 2 END, 'com_content' FROM `#__content`;
SELECT `id`, 1, 'com_content.article' FROM `#__content`;
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ CREATE TABLE IF NOT EXISTS "#__workflows" (
"description" text NOT NULL,
"extension" varchar(50) NOT NULL,
"default" smallint NOT NULL DEFAULT 0,
"core" smallint NOT NULL DEFAULT 0,
"ordering" bigint NOT NULL DEFAULT 0,
"created" timestamp without time zone NOT NULL,
"created_by" bigint DEFAULT 0 NOT NULL,
Expand All @@ -31,8 +30,8 @@ CREATE INDEX "#__workflows_idx_modified" ON "#__workflows" ("modified");
CREATE INDEX "#__workflows_idx_modified_by" ON "#__workflows" ("modified_by");
CREATE INDEX "#__workflows_idx_checked_out" ON "#__workflows" ("checked_out");

INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "core", "ordering", "created", "created_by", "modified", "modified_by", "checked_out_time", "checked_out") VALUES
(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, NULL, 0);
INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "ordering", "created", "created_by", "modified", "modified_by", "checked_out_time", "checked_out") VALUES
(1, 0, 1, 'COM_WORKFLOW_BASIC_WORKFLOW', '', 'com_content.article', 1, 1, CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, NULL, 0);

--
-- Table structure for table "#__workflow_associations"
Expand Down Expand Up @@ -64,7 +63,6 @@ CREATE TABLE IF NOT EXISTS "#__workflow_stages" (
"published" smallint NOT NULL DEFAULT 0,
"title" varchar(255) NOT NULL,
"description" text NOT NULL,
"condition" bigint DEFAULT 0 NOT NULL,
"default" smallint NOT NULL DEFAULT 0,
"checked_out_time" timestamp without time zone,
"checked_out" bigint DEFAULT 0 NOT NULL,
Expand All @@ -80,11 +78,8 @@ CREATE INDEX "#__workflow_stages_idx_checked_out" ON "#__workflow_stages" ("chec
-- Dumping data for table "#__workflow_stages"
--

INSERT INTO "#__workflow_stages" ("id", "asset_id", "ordering", "workflow_id", "published", "title", "description", "condition", "default", "checked_out_time", "checked_out") VALUES
(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 1, NULL, 0),
(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 0, NULL, 0),
(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0, NULL, 0),
(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0, NULL, 0);
INSERT INTO "#__workflow_stages" ("id", "asset_id", "ordering", "workflow_id", "published", "title", "description", "default", "checked_out_time", "checked_out") VALUES
(1, 0, 1, 1, 1, 'COM_WORKFLOW_BASIC_STAGE', '', 1, NULL, 0);

--
-- Table structure for table "#__workflow_transitions"
Expand All @@ -100,6 +95,7 @@ CREATE TABLE IF NOT EXISTS "#__workflow_transitions" (
"description" text NOT NULL,
"from_stage_id" bigint DEFAULT 0 NOT NULL,
"to_stage_id" bigint DEFAULT 0 NOT NULL,
"options" text NOT NULL,
"checked_out_time" timestamp without time zone,
"checked_out" bigint DEFAULT 0 NOT NULL,
PRIMARY KEY ("id")
Expand All @@ -111,21 +107,31 @@ CREATE INDEX "#__workflow_transitions_idx_to_stage_id" ON "#__workflow_transitio
CREATE INDEX "#__workflow_transitions_idx_workflow_id" ON "#__workflow_transitions" ("workflow_id");
CREATE INDEX "#__workflow_transitions_idx_checked_out" ON "#__workflow_transitions" ("checked_out");

INSERT INTO "#__workflow_transitions" ("id", "asset_id", "published", "ordering", "workflow_id", "title", "description", "from_stage_id", "to_stage_id", "checked_out_time", "checked_out") VALUES
(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, NULL, 0),
(2, 0, 1, 2, 1, 'Publish', '', -1, 2, NULL, 0),
(3, 0, 1, 3, 1, 'Trash', '', -1, 3, NULL, 0),
(4, 0, 1, 4, 1, 'Archive', '', -1, 4, NULL, 0);
INSERT INTO "#__workflow_transitions" ("id", "asset_id", "published", "ordering", "workflow_id", "title", "description", "from_stage_id", "to_stage_id", "options", "checked_out_time", "checked_out") VALUES
(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, '{"publishing":"0"}', NULL, 0),
(2, 0, 1, 2, 1, 'Publish', '', -1, 1, '{"publishing":"1"}', NULL, 0),
(3, 0, 1, 3, 1, 'Trash', '', -1, 1, '{"publishing":"-2"}', NULL, 0),
(4, 0, 1, 4, 1, 'Archive', '', -1, 1, '{"publishing":"2"}', NULL, 0),
(5, 0, 1, 5, 1, 'Feature', '', -1, 1, '{"featuring":"1"}', NULL, 0),
(6, 0, 1, 6, 1, 'Unfeature', '', -1, 1, '{"featuring":"0"}', NULL, 0),
(7, 0, 1, 7, 1, 'Publish & Feature', '', -1, 1, '{"publishing":"1","featuring":"1"}', NULL, 0);

--
-- Creating extension entry
--
-- Note that the old pseudo null dates have to be used for the "checked_out_time"
-- column because the conversion to real null dates will be done with a later
-- update SQL script.
--

INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES
(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0);
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES
(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 1, 1, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'plg_workflow_publishing', 'plugin', 'publishing', 'workflow', 0, 1, 1, 0, 1, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'plg_workflow_featuring', 'plugin', 'featuring', 'workflow', 0, 1, 1, 0, 1, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'plg_workflow_notification', 'plugin', 'notification', 'workflow', 0, 1, 1, 0, 1, '', '{}', 0, '1970-01-01 00:00:00', 0, 0);

--
-- Creating Associations for existing content
--
INSERT INTO "#__workflow_associations" ("item_id", "stage_id", "extension")
SELECT "id", CASE WHEN "state" = -2 THEN 3 WHEN "state" = 0 THEN 1 WHEN "state" = 2 THEN 4 ELSE 2 END, 'com_content' FROM "#__content";
SELECT "id", 1, 'com_content.article' FROM "#__content";
10 changes: 7 additions & 3 deletions administrator/components/com_content/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,11 +1039,15 @@
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

</fieldset>
<fieldset
name="integration_workflows"
label="JWORKFLOW_TITLE"
>
<field
name="workflows_enable"
name="workflow_enabled"
type="radio"
label="JGLOBAL_WORKFLOWS_ENABLE_LABEL"
label="JWORKFLOW_ENABLED_LABEL"
layout="joomla.form.field.radio.switcher"
default="1"
>
Expand Down
59 changes: 32 additions & 27 deletions administrator/components/com_content/forms/article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,18 @@
/>

<field
name="transition"
type="transition"
label="COM_CONTENT_TRANSITION"
extension="com_content"
/>
name="state"
type="list"
label="JSTATUS"
class="custom-select-color-state"
size="1"
default="1"
>
<option value="1">JPUBLISHED</option>
<option value="0">JUNPUBLISHED</option>
<option value="2">JARCHIVED</option>
<option value="-2">JTRASHED</option>
</field>

<field
name="tags"
Expand Down Expand Up @@ -157,6 +164,26 @@
filter="user_utc"
/>

<field
name="featured_up"
type="calendar"
label="COM_CONTENT_FIELD_FEATURED_UP_LABEL"
translateformat="true"
showtime="true"
size="22"
filter="user_utc"
/>

<field
name="featured_down"
type="calendar"
label="COM_CONTENT_FIELD_FEATURED_DOWN_LABEL"
translateformat="true"
showtime="true"
size="22"
filter="user_utc"
/>

<field
name="version"
type="text"
Expand Down Expand Up @@ -228,28 +255,6 @@
<option value="1">JYES</option>
</field>

<field
name="featured_up"
type="calendar"
label="COM_CONTENT_FIELD_FEATURED_UP_LABEL"
translateformat="true"
showtime="true"
size="22"
filter="user_utc"
showon="featured:1"
/>

<field
name="featured_down"
type="calendar"
label="COM_CONTENT_FIELD_FEATURED_DOWN_LABEL"
translateformat="true"
showtime="true"
size="22"
filter="user_utc"
showon="featured:1"
/>

<field
name="rules"
type="rules"
Expand Down
10 changes: 6 additions & 4 deletions administrator/components/com_content/forms/filter_articles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
</field>

<field
name="condition"
type="workflowcondition"
label="JOPTION_SELECT_CONDITION"
name="published"
type="status"
label="JOPTION_SELECT_PUBLISHED"
onchange="this.form.submit();"
extension="com_content"
>
<option value="">JOPTION_SELECT_CONDITION</option>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>

<field
Expand Down Expand Up @@ -125,6 +125,8 @@
<option value="">JGLOBAL_SORT_BY</option>
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="ws.title ASC">JSTAGE_ASC</option>
<option value="ws.title DESC">JSTAGE_DESC</option>
<option value="a.state ASC">JSTATUS_ASC</option>
<option value="a.state DESC">JSTATUS_DESC</option>
<option value="a.featured ASC">JFEATURED_ASC</option>
Expand Down
10 changes: 6 additions & 4 deletions administrator/components/com_content/forms/filter_featured.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
</field>

<field
name="condition"
type="workflowcondition"
label="JOPTION_SELECT_CONDITION"
name="published"
type="status"
label="JOPTION_SELECT_PUBLISHED"
onchange="this.form.submit();"
extension="com_content"
>
<option value="">JOPTION_SELECT_CONDITION</option>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>

<field
Expand Down Expand Up @@ -111,6 +111,8 @@
<option value="">JGLOBAL_SORT_BY</option>
<option value="fp.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
<option value="fp.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="ws.title ASC">JSTAGE_ASC</option>
<option value="ws.title DESC">JSTAGE_DESC</option>
<option value="a.state ASC">JSTATUS_ASC</option>
<option value="a.state DESC">JSTATUS_DESC</option>
<option value="a.title ASC">JGLOBAL_TITLE_ASC</option>
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_content/presets/content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
title="COM_CONTENT_MENUS_WORKFLOW"
type="component"
element="com_workflow"
link="index.php?option=com_workflow&amp;view=workflows&amp;extension=com_content"
link="index.php?option=com_workflow&amp;view=workflows&amp;extension=com_content.article"
/>

<menuitem
Expand Down
Loading