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

Workflow v3 #95

Merged
merged 126 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 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
ceb5064
[4.0] Backend: Plugin changelog fails #29043 (#29223)
810 May 26, 2020
e50442e
Lowercase plugin name (#29227)
SharkyKZ May 26, 2020
8d70f4a
[4.0] com_mails: string typo & template fields labels display missing…
infograf768 May 26, 2020
bbe073c
Fix HTML body input disabled in mail templates js (#29229)
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
86a9ee7
Update main.php (#29225)
C-Lodder 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
3aa018e
[4.0] Template Atum - Remove content padding (#28975)
coolcat-creations 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
4f6e43b
[4.0] Bump Bootstrap to 4.5.0 and jQuery to 3.5, jQuery migrate to 3.…
wilsonge 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
5563e48
[4.0] Multingual: Missing associations column in articles featured vi…
infograf768 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
bd63b3c
[4.0] Use unique identifiers in ExtensionHelper::getExtensionRecord()…
SharkyKZ 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
7a0631e
Reviewing Tag Model and Tag Table (#29232)
Hackwar May 28, 2020
05361d9
Articles: Allow to populate viewlevels from state (#29231)
Hackwar May 28, 2020
9d3f7aa
[4.0] WebAuth improvements (#28241)
C-Lodder May 28, 2020
15674ee
[4.0] Allow jForm to support data attribute (#27212)
vaivk369 May 28, 2020
65049d1
[4.0] Adding version switch in Image and Imagefilter for PHP8 (#28694)
Hackwar May 29, 2020
3f80758
Refactor data attributes for form fields (#29252)
HLeithner May 29, 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
f6b94f5
[4.0] Converting checked_out fields to true NULLs (#29260)
Hackwar 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
20 changes: 10 additions & 10 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -6560,7 +6560,7 @@ private function contactItems(Table $tableItem): array
}

$parentId = $tableItem->id;
$componentId = ExtensionHelper::getExtensionRecord('com_fields')->extension_id;
$componentId = ExtensionHelper::getExtensionRecord('com_fields', 'component')->extension_id;

// Add Contact Fields Menu Items.
$menuItems = [
Expand All @@ -6576,7 +6576,7 @@ private function contactItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
'checked_out' => 0,
'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
Expand All @@ -6601,7 +6601,7 @@ private function contactItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
'checked_out' => 0,
'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
Expand All @@ -6626,7 +6626,7 @@ private function contactItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
'checked_out' => 0,
'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
Expand Down Expand Up @@ -6670,7 +6670,7 @@ private function finderItems(Table $tableItem): array
}

$parentId = $tableItem->id;
$componentId = ExtensionHelper::getExtensionRecord('com_finder')->extension_id;
$componentId = ExtensionHelper::getExtensionRecord('com_finder', 'component')->extension_id;

// Add Finder Fields Menu Items.
$menuItems = [
Expand All @@ -6686,7 +6686,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
'checked_out' => 0,
'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
Expand All @@ -6711,7 +6711,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
'checked_out' => 0,
'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
Expand All @@ -6736,7 +6736,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
'checked_out' => 0,
'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
Expand All @@ -6761,7 +6761,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
'checked_out' => 0,
'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
Expand All @@ -6786,7 +6786,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
'checked_out' => 0,
'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
Expand Down
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);
(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 1, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'plg_workflow_publishing', 'plugin', 'publishing', 'workflow', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'plg_workflow_featuring', 'plugin', 'featuring', 'workflow', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'plg_workflow_notification', 'plugin', 'notification', 'workflow', 0, 1, 1, 0, '', '{}', 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
@@ -0,0 +1,39 @@
ALTER TABLE `#__extensions` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__menu` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__modules` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__tags` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__update_sites` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__user_notes` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__workflows` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__workflow_stages` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__workflow_transitions` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__banners` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__banner_clients` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__contact_details` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__content` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__finder_filters` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__newsfeeds` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__categories` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__fields` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__fields_groups` MODIFY `checked_out` INT(10) UNSIGNED;
ALTER TABLE `#__ucm_content` MODIFY `core_checked_out_user_id` INT(10) UNSIGNED;

UPDATE `#__extensions` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__menu` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__modules` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__tags` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__update_sites` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__user_notes` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__workflows` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__workflow_stages` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__workflow_transitions` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__banners` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__banner_clients` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__contact_details` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__content` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__finder_filters` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__newsfeeds` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__categories` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__fields` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__fields_groups` SET `checked_out` = null WHERE `checked_out` = 0;
UPDATE `#__ucm_content` SET `core_checked_out_user_id` = null WHERE `checked_out` = 0;
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);
(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 1, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'plg_workflow_publishing', 'plugin', 'publishing', 'workflow', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'plg_workflow_featuring', 'plugin', 'featuring', 'workflow', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'plg_workflow_notification', 'plugin', 'notification', 'workflow', 0, 1, 1, 0, '', '{}', 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";
Loading