Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
424 commits
Select commit Hold shift + click to select a range
917100e
fixing current date function issue
Buddhima Sep 8, 2017
2383382
Merge pull request #105 from Buddhima/fix_create_time_sql
bembelimen Sep 8, 2017
a9b6933
Fix context when saving a workflow
bembelimen Sep 8, 2017
b4c49ce
Merge pull request #106 from joomla-projects/Fix_context_while_saving
bembelimen Sep 8, 2017
88a0198
Create a default state while creating a new workflow
bembelimen Sep 8, 2017
63b533c
save2copy button added
HRIT-Florian Sep 8, 2017
15761f9
Rename "workflow" to "workflows" in the menu
bembelimen Sep 8, 2017
2f8e5c1
Merge branch 'staging' of github.com:joomla-projects/GSoC17_publishin…
HRIT-Florian Sep 8, 2017
b1ffd48
Auto-populate the model state. filter.extension
HRIT-Florian Sep 8, 2017
7c9bf89
Fix context for state model
bembelimen Sep 8, 2017
c9354af
Merge branch 'staging' of github.com:joomla-projects/GSoC17_publishin…
HRIT-Florian Sep 8, 2017
8118524
save2copy workfolow > states
HRIT-Florian Sep 8, 2017
376da72
Fix saving context in transiton model
bembelimen Sep 9, 2017
0769f1b
Merge branch 'staging' of github.com:joomla-projects/GSoC17_publishin…
HRIT-Florian Sep 9, 2017
ca6b85c
Add number of transitions/states in workflows view
bembelimen Sep 9, 2017
33882e0
Merge branch 'staging' of github.com:joomla-projects/GSoC17_publishin…
HRIT-Florian Sep 9, 2017
602f6ba
Clean up code
HRIT-Florian Sep 9, 2017
dea615c
save2copy workflow > transitions
HRIT-Florian Sep 9, 2017
b05fd2a
generateNewTitle when save2copy added
HRIT-Florian Sep 9, 2017
07bad9b
Merge pull request #107 from Didldu-Florian/save_copy
bembelimen Sep 9, 2017
70a2498
Add published filter for status/transition listing in workflow view
bembelimen Sep 9, 2017
74a4ef3
Fix trashed status when filtered
bembelimen Sep 9, 2017
6707421
Merge transition and state column with special transition
bembelimen Sep 9, 2017
b5180d3
Use plurals for the sidebar
chmst Sep 9, 2017
2f3a470
Align states to the left
bembelimen Sep 9, 2017
d7c3eb5
Converted articles state filter to a grouped list
bembelimen Sep 9, 2017
9588e40
Merge pull request #109 from joomla-projects/transitions_in_article_list
bembelimen Sep 9, 2017
606a7d7
Sniffer satisfaction
bembelimen Sep 9, 2017
f04f855
Sniffer satisfaction
bembelimen Sep 9, 2017
fa1c727
Code cleanup
bembelimen Sep 9, 2017
dd123d8
Fix articles count in category
bembelimen Sep 9, 2017
94260f2
Merge pull request #115 from joomla-projects/fix_sniffer
bembelimen Sep 9, 2017
0ce906d
Fix execute transitions on all articles #112 (#117)
Sep 9, 2017
0b07295
Rename extenstion => extension
bembelimen Sep 9, 2017
3904b7a
Improve state edit layout - move condition from publishing area to ma…
chmst Sep 9, 2017
9fc24fc
Label with generic text
chmst Sep 9, 2017
987bbed
adding new workflow states field
Buddhima Sep 10, 2017
2581a86
fix codesniffer issues
Buddhima Sep 10, 2017
480c779
Merge branch 'staging' of github.com:joomla-projects/GSoC17_publishin…
bembelimen Sep 10, 2017
05cdd51
Merge pull request #116 from joomla-projects/fix_articles_count_in_ca…
bembelimen Sep 10, 2017
8edc355
Merge pull request #118 from chmst/Move_field_condition
bembelimen Sep 10, 2017
c4a6d32
update field class according to suggesstions
Buddhima Sep 10, 2017
95e5d6f
Merge pull request #119 from Buddhima/grouped_state_filter_field
bembelimen Sep 10, 2017
5700ccc
Merge pull request #111 from joomla-projects/grouped_state_filter
bembelimen Sep 10, 2017
0f3f95c
fix issue with settting the default value with state edit form
Buddhima Sep 10, 2017
6d040f9
Merge pull request #120 from Buddhima/fix_issue_states_default
bembelimen Sep 10, 2017
f4a66dd
Reolve https://github.com/joomla-projects/GSoC17_publishing_workflow/…
chmst Sep 10, 2017
d45fcce
Code changed: getTable, use sprintf
chmst Sep 10, 2017
c5e3671
Unpublish new copy
HRIT-Florian Sep 10, 2017
c7bc6d9
Merge pull request #123 from Didldu-Florian/save_copy
bembelimen Sep 10, 2017
0f2fe70
Save2copy for states
HRIT-Florian Sep 10, 2017
9061873
save2copy check if title exists
HRIT-Florian Sep 10, 2017
9bd1e14
Merge pull request #122 from chmst/more_plurals_in_sidebar
bembelimen Sep 10, 2017
2fe7b6d
Disable the switcher on edit state if the state is default
chmst Sep 10, 2017
bfb899e
Fixed getValue
chmst Sep 11, 2017
5810ae5
Merge pull request #125 from chmst/disable_default-switcher_on_edit_s…
bembelimen Sep 11, 2017
71dcc6b
Simplified and escaped
chmst Sep 11, 2017
cda42b9
fixed: check for table-entry workflow
chmst Sep 11, 2017
6e963f3
Merge pull request #121 from chmst/Workflow_name_in_lists
bembelimen Sep 11, 2017
c6afde7
merge 4.0-dev
zero-24 Sep 11, 2017
dfdbd14
recompile core.min.js
zero-24 Sep 11, 2017
4a5672a
Fix new class structure
bembelimen Sep 11, 2017
5c2c1a6
Fix #110 deletion of trashed articles
bembelimen Sep 12, 2017
7298671
Readd featuring articles
bembelimen Sep 12, 2017
9fdaa16
Adds ordering to the states and transitions #94
Sep 13, 2017
b544eb2
adding current state to article edit view, transition drop-down
Buddhima Sep 16, 2017
a74dfad
remove default value in XML config
Buddhima Sep 16, 2017
4381447
Merge pull request #128 from Buddhima/improve_article_edit_transition
bembelimen Sep 16, 2017
1a9727f
Shorten return code
bembelimen Sep 16, 2017
ed9caed
Merge pull request #129 from joomla-projects/improve_article_edit_tra…
bembelimen Sep 16, 2017
cea5f1a
Merge remote-tracking branch 'origin/staging' into ordering
Sep 20, 2017
4545873
Moved form xml to "forms" folder
bembelimen Sep 29, 2017
54c8842
Moved validation to the table class
bembelimen Sep 29, 2017
b8e8541
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into staging
bembelimen Sep 29, 2017
58cddb0
Add deploy version instead of a normal version
bembelimen Sep 29, 2017
057b8e2
Add more deploy versions
bembelimen Sep 29, 2017
b3688ff
Merge pull request #124 from Didldu-Florian/save_copy
bembelimen Sep 29, 2017
58e9fc6
Merge branch 'staging' into improve_saving
bembelimen Sep 29, 2017
0442c28
Fix saving with workflow_id
bembelimen Sep 30, 2017
237a912
Merge pull request #134 from joomla-projects/Deploy_version
bembelimen Sep 30, 2017
db4fdcc
Merge pull request #133 from joomla-projects/improve_saving
bembelimen Sep 30, 2017
6a28c8e
adding workflow_associations table structure
Buddhima Sep 27, 2017
cdf27ae
fix sql issue
Buddhima Sep 30, 2017
3c0ffc2
adding new workflow-association manipulations
Buddhima Sep 30, 2017
0b5d565
change article saving to use associations
Buddhima Sep 30, 2017
c4a59ab
changing article saving, transition saving actions to do via associat…
Buddhima Sep 30, 2017
7c43e94
update state filtering field to use workflow_associations
Buddhima Sep 30, 2017
01de3b7
fix issue with identifying transitionId when executing runTransition
Buddhima Sep 30, 2017
beb54f7
First rewrite to reflect the new class convention
bembelimen Sep 30, 2017
52b7736
Change table class where needed
bembelimen Sep 30, 2017
09544f4
Fix wrong language string
bembelimen Sep 30, 2017
8e432ca
More table fixes
bembelimen Sep 30, 2017
a15abdf
Next table classname fix
bembelimen Sep 30, 2017
6b8ca8b
Table::getInstance => new Table
bembelimen Sep 30, 2017
2e74e67
Sniffer fixes
bembelimen Sep 30, 2017
6dd98e4
Fix where in workflow table
bembelimen Sep 30, 2017
5994700
Fix where in workflow table
bembelimen Sep 30, 2017
5d885ca
Fix saving error for workflows
bembelimen Sep 30, 2017
808e91f
adding comments and remove an unnecessary method
Buddhima Oct 1, 2017
23b3e6f
Move the main properties auf a transition from the right column to th…
chmst Oct 1, 2017
15388f2
Merge pull request #135 from Buddhima/workflow_associations_impl
Buddhima Oct 1, 2017
66e037c
move namespace to state filter field
Buddhima Oct 1, 2017
7d86308
update featured article view according to articles view changes
Buddhima Oct 1, 2017
a116283
fixing style issue in featured default
Buddhima Oct 1, 2017
353da7e
style fixing in featured default 2
Buddhima Oct 1, 2017
1bccea0
style fixing in featured default 3
Buddhima Oct 1, 2017
7f81551
Merge branch 'staging' of https://github.com/joomla-projects/GSoC17_p…
Oct 2, 2017
3177778
Merge branch 'staging' into ordering
bembelimen Oct 3, 2017
6c5036d
Set default values
bembelimen Oct 3, 2017
c0fb0de
Merge branch 'staging' into ordering
bembelimen Oct 3, 2017
be3369f
Move table for workflow association
bembelimen Oct 3, 2017
20a95b6
Fix sql default value
bembelimen Oct 3, 2017
592c9bd
Move table for workflow association
bembelimen Oct 3, 2017
69d2f79
Merge branch 'staging' into ordering
bembelimen Oct 3, 2017
ca9693e
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into staging
bembelimen Oct 3, 2017
b7faf2c
Remove colored workflow param select
bembelimen Oct 3, 2017
1abef37
Merge branch 'staging' of github.com:joomla-projects/GSoC17_publishin…
bembelimen Oct 3, 2017
640546a
Add workflow ordering
bembelimen Oct 3, 2017
cf7c0eb
Merge pull request #136 from chmst/improve-transition-edit-view
bembelimen Oct 3, 2017
3356864
Merge pull request #137 from Buddhima/update_featured_article_view_wi…
Buddhima Oct 3, 2017
82d82f1
adding final state in transition drop-down
Buddhima Oct 3, 2017
233d6ec
adding workflow helper to return condition name and append it to the …
Buddhima Oct 3, 2017
ce379ac
Add ordering to the state and transition
Oct 3, 2017
10cc00c
Merge branch 'ordering' of https://github.com/joomla-projects/GSoC17_…
Oct 3, 2017
26838ea
Add condition to the transition field
bembelimen Oct 5, 2017
fd99424
Merge pull request #1 from joomla-projects/add_state_in_transition_text
Buddhima Oct 5, 2017
829c410
Merge pull request #142 from Buddhima/add_state_in_transition_text
Buddhima Oct 5, 2017
e1df907
implementing delete record in workflow associations table when deleti…
Buddhima Oct 5, 2017
a9e3b1f
Merge pull request #144 from Buddhima/impl_workflow_associations_delete
Buddhima Oct 5, 2017
22ff96e
update admin mod_latest to use workflow_state
Buddhima Oct 5, 2017
12dbc84
Fixing issues from review
Oct 7, 2017
8e0df22
Merge remote-tracking branch 'origin/staging' into ordering
Oct 7, 2017
04c4967
Fixing conlict with staging
Oct 7, 2017
95f318b
Fixing projection to int on workflow_id
Oct 7, 2017
62476b5
Merge pull request #143 from joomla-projects/ordering
bembelimen Oct 7, 2017
4eef4fa
fixing issues with using workflow_associations in category view
Buddhima Oct 7, 2017
be78904
update archive articles modulw with workflow_association changes
Buddhima Oct 8, 2017
b091911
fixing transition field ambiguity in ordering
Buddhima Oct 8, 2017
6dc75ed
Merge pull request #149 from Buddhima/fix_transition-field_ordering
Buddhima Oct 8, 2017
ded7185
Merge pull request #147 from Buddhima/fixing_category_list_view
Buddhima Oct 8, 2017
6574b04
adding layouts for batch processing
Buddhima Oct 9, 2017
57ce615
fixing display issues with workflow states dropdown
Buddhima Oct 9, 2017
96c37db
adding workfow state change functionality
Buddhima Oct 9, 2017
175185c
adding access control checks for workflows list related places
Buddhima Oct 14, 2017
96e4750
few modifications to workflow model
Buddhima Oct 14, 2017
3efb1b8
update controller and models of state, transition
Buddhima Oct 14, 2017
3312363
modify config files according to com_workflow permission hierarchy
Buddhima Oct 18, 2017
25ecaae
refactor models and views to use permissions
Buddhima Oct 21, 2017
624ecfe
fix suggesstion in PR
Buddhima Oct 21, 2017
bdbef68
fix for adding users
Buddhima Oct 22, 2017
1025334
adding transition.run permission to com_content entry
Buddhima Oct 22, 2017
cc11b56
fixing workflow saving issue and use permissions for list view state …
Buddhima Oct 22, 2017
62131fe
fix suggesstion in PR-2
Buddhima Oct 22, 2017
7b5b9d6
fixing suggesstion in PR
Buddhima Oct 23, 2017
84a10e3
Merge branch 'master' into staging
bembelimen Dec 14, 2017
cc22a18
Merge branch '4.0-dev' into 4.0_alpha_integration
bembelimen Dec 23, 2017
d2ec5c4
Merge pull request #155 from joomla-projects/4.0_alpha_integration
bembelimen Dec 23, 2017
7e29b1b
Rename transition.run => core.execute.transition
bembelimen Dec 23, 2017
e8dd905
Merge pull request #157 from joomla-projects/impl_access_control
bembelimen Dec 23, 2017
8f46f7f
Merge branch 'staging' into update_archive_article_with_associations
bembelimen Dec 23, 2017
0486060
Add parameter to WorkflowState field, so it's possible to show all st…
bembelimen Dec 23, 2017
570a30b
Merge pull request #158 from joomla-projects/update_archive_article_w…
bembelimen Dec 23, 2017
49d8c8a
Merge branch 'staging' into implementing_batch_processing
bembelimen Dec 23, 2017
c6e230c
Add permission check for batch transition executions
bembelimen Dec 23, 2017
c29a2cb
Fix broken transition batch
bembelimen Dec 23, 2017
c4f4a7e
Merge pull request #159 from joomla-projects/implementing_batch_proce…
bembelimen Dec 23, 2017
5f81e50
Merge pull request #145 from Buddhima/update_admin_module
bembelimen Dec 23, 2017
56b9ca9
Set transition batch execution to super users only
bembelimen Dec 23, 2017
7c3d60c
Implement some cleanups
bembelimen Dec 26, 2017
b6a1429
Fix article saving
bembelimen Dec 26, 2017
c207fbb
Implement email notification for transition execution
bembelimen Dec 26, 2017
7ff5bb1
Merge pull request #160 from joomla-projects/email_notification
bembelimen Dec 26, 2017
c06af6e
Rename the transition dropdown in the article edit form
bembelimen Dec 26, 2017
71e3a8f
Readd save2copy
bembelimen Dec 27, 2017
2976e68
Convert frontend state to transition in edit form
bembelimen Jan 8, 2018
e2c437a
Merge branch '4.0-dev' into staging
bembelimen Jan 15, 2018
c4a451b
Merge 4.0 dev from core
bembelimen Jan 18, 2018
7502626
Merge branch '4.0-dev' into staging
bembelimen Apr 26, 2018
171d15b
Merge branch 'staging' of github.com:joomla-projects/GSoC17_publishin…
bembelimen Apr 26, 2018
5794c26
Fix sniffer issues
bembelimen Apr 26, 2018
a086d41
Remove unnecessary parenthesis
bembelimen Apr 26, 2018
2795342
Fix more sniffer issues
bembelimen Apr 26, 2018
6518a92
Merge branch 'publishing-workflow' of github.com:bembelimen/joomla-cm…
bembelimen Apr 26, 2018
3ec0ada
Rename setHome to setDefault
bembelimen Apr 27, 2018
4fa5e7e
Use JDate instead of date()
bembelimen Apr 27, 2018
ecfed93
Protect workflow from uninstall
bembelimen Apr 27, 2018
3463bb4
Add ordering to the select for workflow state field
bembelimen Apr 27, 2018
acdf891
Fix menu with deactivated workflow
bembelimen Apr 27, 2018
096d72f
Replace $db->qn by $db->quoteName
chmst Apr 29, 2018
34a1d20
Replace $db->q( by $db->quote(
chmst Apr 29, 2018
db01780
Merge pull request #6 from chmst/qn-to-quoteName
bembelimen Apr 29, 2018
596750d
Validate before status deletion if no items are assigned
bembelimen May 7, 2018
9b8c734
Moved transition form field to the libraries folder
bembelimen May 8, 2018
b323d83
Moved transition form field to the libraries folder
bembelimen May 8, 2018
e7b16ab
Implement Workflow library class with condition constants
bembelimen May 8, 2018
2c677ef
Merge branch 'publishing-workflow' into publishing-workflow-library
bembelimen May 8, 2018
b709c78
Merge pull request #10 from bembelimen/publishing-workflow-library
bembelimen May 8, 2018
2e65102
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into publishin…
bembelimen May 8, 2018
f0aa58e
Fix workflowHelper Submenu call
bembelimen May 8, 2018
78a4ce7
Add Workflow constant to the frontpage
bembelimen May 8, 2018
d121f01
Moves state select field to the library folder
bembelimen May 8, 2018
5d838e0
Fix some sniffer errors
bembelimen May 9, 2018
1d4eb57
Fix wrong parameter structure
bembelimen May 9, 2018
6402176
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into publishin…
bembelimen May 11, 2018
114c5dc
Fix wrong input parameter
bembelimen May 11, 2018
5d91bac
Fix transition filter in the form
bembelimen May 12, 2018
5809b57
Fix state transitions on publishing content
wilsonge May 12, 2018
62bc488
Merge pull request #11 from wilsonge/fix/publish-transitions
bembelimen May 12, 2018
19d5488
Add "All" for source states in transitions
bembelimen May 12, 2018
b9dcb43
Fix wrong table prefix
bembelimen May 13, 2018
3df8464
Fix frontend article displaying
bembelimen May 13, 2018
4a29c2a
Fix broken status/transition filtering
bembelimen May 13, 2018
3e16eee
Fix transition publishing/ordering
bembelimen May 13, 2018
8f3ad98
Change qn => quoteName
bembelimen May 13, 2018
850c37b
Change qn => quoteName
bembelimen May 13, 2018
df72d53
Add inheritation for workflows in categories
bembelimen May 14, 2018
52d15d9
Create Joomla! 3 => 4 migration script for com_workflow
bembelimen May 15, 2018
d3bab84
Add extension entry for update proccess
bembelimen May 15, 2018
dfa2001
Fix error in featured article view
bembelimen May 15, 2018
827bad1
Add missing namespace
bembelimen May 15, 2018
c87832b
Updated files 1.0
priiish Jul 25, 2018
92b87e5
Finished updating language files.
priiish Jul 26, 2018
ee15edc
Merge pull request #12 from priiish/publishing-workflow
bembelimen Jul 26, 2018
a5e3bac
Language File Update
priiish Jul 30, 2018
a96b1ab
Merge pull request #14 from priiish/publishing-workflow
bembelimen Jul 30, 2018
149dc38
Language File Update
priiish Jul 30, 2018
c747a75
when trying to delete default state, false error message thrown
priiish Aug 2, 2018
1be7ca5
Merge branch '4.0-dev' into publishing-workflow
bembelimen Aug 3, 2018
c0fdba4
Fix sniffer errors
chmst Aug 3, 2018
404b17b
Fix param type
chmst Aug 3, 2018
51c26aa
Merge pull request #18 from chmst/workflow-satisfy-sniffer
bembelimen Aug 3, 2018
9657058
Satisfy sniffer
bembelimen Aug 4, 2018
0f573e5
Satisfy sniffer
bembelimen Aug 4, 2018
5ed18ea
Satisfy sniffer
bembelimen Aug 4, 2018
85fcba4
Added the workflow to the main menu because due to some changes in th…
chmst Aug 6, 2018
ea514bf
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into publishin…
bembelimen Aug 6, 2018
0defc80
Remove duplicate Lines in use statements
chmst Aug 7, 2018
da938ad
Merge pull request #20 from chmst/duplicate-lines-modelcategory
bembelimen Aug 7, 2018
0a49fe3
Merge pull request #15 from priiish/publishing-workflow
bembelimen Aug 7, 2018
d6731ec
Merge pull request #16 from priiish/publishing_workflow_bugfix
bembelimen Aug 7, 2018
c02fb6c
Merge pull request #19 from chmst/add-workflow-to-predefined-xml
bembelimen Aug 7, 2018
c478b5c
Fix loading ContentHelper twice
bembelimen Aug 8, 2018
90bca1c
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into publishin…
bembelimen Aug 8, 2018
cd02c9a
Fix broken use calls
bembelimen Aug 8, 2018
1567f0a
Renamed "Title" => "Name"
bembelimen Aug 8, 2018
b3d7869
Merge branch '4.0-dev' into publishing-workflow
rdeutz Aug 8, 2018
58aa4e8
Improve accessibility of list Views. sope=cols, no table footer, pagi…
chmst Aug 8, 2018
c2ed718
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into publishin…
bembelimen Aug 8, 2018
370ff8c
Merge pull request #21 from chmst/a11y-list-view-tables
bembelimen Aug 8, 2018
729b23c
Fix layout
bembelimen Aug 8, 2018
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
--
-- Table structure for table `#__workflows`
--

CREATE TABLE IF NOT EXISTS `#__workflows` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`asset_id` int(10) DEFAULT 0,
`published` tinyint(1) NOT NULL DEFAULT 0,
`title` varchar(255) NOT NULL,
`description` text NOT NULL DEFAULT '',
Copy link
Contributor

Choose a reason for hiding this comment

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

The MySQL 'TEXT' type cannot have a DEFAULT value (other than NULL)

`extension` varchar(255) NOT NULL,
`default` tinyint(1) NOT NULL DEFAULT 0,
`ordering` int(11) NOT NULL DEFAULT 0,
`created` datetime NOT NULL DEFAULT NOW(),
`created_by` int(10) NOT NULL DEFAULT 0,
`modified` datetime NOT NULL DEFAULT NOW(),
`modified_by` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `asset_id` (`asset_id`),
KEY `title` (`title`(191)),
KEY `extension` (`extension`(191)),
KEY `default` (`default`),
KEY `created` (`created`),
KEY `created_by` (`created_by`),
KEY `modified` (`modified`),
KEY `modified_by` (`modified_by`)
) ENGINE=InnoDB COLLATE=utf8mb4_unicode_ci;
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't be ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci ?


--
-- Dumping data for table `#__workflows`
--

INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `ordering`, `created`, `created_by`, `modified`, `modified_by`) VALUES
(1, 0, 1, 'Joomla! Default', '', 'com_content', 1, 1, NOW(), 0, '0000-00-00 00:00:00', 0);

--
-- Table structure for table `#__workflow_associations`
--

CREATE TABLE IF NOT EXISTS `#__workflow_associations` (
`item_id` int(10) NOT NULL DEFAULT 0 COMMENT 'Extension table id value',
`state_id` int(10) NOT NULL COMMENT 'Foreign Key to #__workflow_states.id',
`extension` varchar(100) NOT NULL,
PRIMARY KEY (`item_id`, `state_id`, `extension`),
KEY `idx_item_id` (`item_id`),
KEY `idx_state_id` (`state_id`),
KEY `idx_extension` (`extension`(100))
) ENGINE=InnoDB COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `#__workflow_states`
--

CREATE TABLE IF NOT EXISTS `#__workflow_states` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`asset_id` int(10) DEFAULT 0,
`ordering` int(11) NOT NULL DEFAULT 0,
`workflow_id` int(10) NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT 0,
`title` varchar(255) NOT NULL,
`description` text NOT NULL DEFAULT '',
`condition` enum('0','1','-2') NOT NULL,
`default` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `workflow_id` (`workflow_id`),
KEY `title` (`title`(191)),
KEY `asset_id` (`asset_id`),
KEY `default` (`default`)
) ENGINE=InnoDB DEFAULT COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `#__workflow_states`
--

INSERT INTO `#__workflow_states` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `condition`, `default`) VALUES
(1, 0, 1, 1, 1, 'Unpublished', '', '0', 0),
(2, 0, 2, 1, 1, 'Published', '', '1', 1),
(3, 0, 3, 1, 1, 'Trashed', '', '-2', 0),
(4, 0, 4, 1, 1, 'Archived', '', '1', 0);

--
-- Table structure for table `#__workflow_transitions`
--

CREATE TABLE IF NOT EXISTS `#__workflow_transitions` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`asset_id` int(10) DEFAULT 0,
`ordering` int(11) NOT NULL DEFAULT 0,
`workflow_id` int(10) NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT 0,
`title` varchar(255) NOT NULL,
`description` text NOT NULL DEFAULT '',
`from_state_id` int(10) NOT NULL,
`to_state_id` int(10) NOT NULL,
PRIMARY KEY (`id`),
KEY `title` (`title`(191)),
KEY `asset_id` (`asset_id`),
KEY `from_state_id` (`from_state_id`),
KEY `to_state_id` (`to_state_id`),
KEY `workflow_id` (`workflow_id`)
) ENGINE=InnoDB DEFAULT COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `#__workflow_transitions`
--

INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_state_id`, `to_state_id`) VALUES
(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1),
(2, 0, 1, 2, 1, 'Publish', '', -1, 2),
(3, 0, 1, 3, 1, 'Trash', '', -1, 3),
(4, 0, 1, 4, 1, 'Archive', '', -1, 4);

--
-- Creating extension entry
--

INSERT INTO `#__extensions` (`extension_id`, `package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`, `namespace`) VALUES
(35, 0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0, 'Joomla\\Component\\Workflow');

--
-- Creating Associations for existing content
--
INSERT INTO `#__workflow_associations` (`item_id`, `state_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`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @nikosdion as discussed on JAB in Cologne, I added the migration INSERT. Could you please look over the file and see, if there is something to improve? Perhaps we have to handle the asset_id in a seperate way? Thank you very much!

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Benjamin! Sorry for the late reply. I got a gastrointestinal infection right after JaB and I'm still quite awful.

This query is exactly what I had in mind when we talked! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you!

47 changes: 28 additions & 19 deletions administrator/components/com_categories/Model/CategoryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,30 +422,39 @@ protected function preprocessForm(\JForm $form, $data, $group = 'content')
}
}

// Try to find the component helper.
$eName = str_replace('com_', '', $component);
$path = Path::clean(JPATH_ADMINISTRATOR . "/components/$component/helpers/category.php");
$componentInterface = Factory::getApplication()->bootComponent($component);

if (file_exists($path))
if ($componentInterface instanceof CategoriesServiceInterface)
{
$cName = ucfirst($eName) . ucfirst($section) . 'HelperCategory';

\JLoader::register($cName, $path);
$componentInterface->prepareForm($form, $data);
}
else
{
// Try to find the component helper.
$eName = str_replace('com_', '', $component);
$path = Path::clean(JPATH_ADMINISTRATOR . "/components/$component/helpers/category.php");

if (class_exists($cName) && is_callable(array($cName, 'onPrepareForm')))
if (file_exists($path))
{
$lang->load($component, JPATH_BASE, null, false, false)
|| $lang->load($component, JPATH_BASE . '/components/' . $component, null, false, false)
|| $lang->load($component, JPATH_BASE, $lang->getDefault(), false, false)
|| $lang->load($component, JPATH_BASE . '/components/' . $component, $lang->getDefault(), false, false);
call_user_func_array(array($cName, 'onPrepareForm'), array(&$form));

// Check for an error.
if ($form instanceof \Exception)
{
$this->setError($form->getMessage());
$cName = ucfirst($eName) . ucfirst($section) . 'HelperCategory';

return false;
\JLoader::register($cName, $path);

if (class_exists($cName) && is_callable(array($cName, 'onPrepareForm')))
{
$lang->load($component, JPATH_BASE, null, false, false)
|| $lang->load($component, JPATH_BASE . '/components/' . $component, null, false, false)
|| $lang->load($component, JPATH_BASE, $lang->getDefault(), false, false)
|| $lang->load($component, JPATH_BASE . '/components/' . $component, $lang->getDefault(), false, false);
call_user_func_array(array($cName, 'onPrepareForm'), array(&$form));

// Check for an error.
if ($form instanceof \Exception)
{
$this->setError($form->getMessage());

return false;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
use Joomla\CMS\Extension\BootableExtensionInterface;
use Joomla\CMS\Extension\MVCComponent;
use Joomla\CMS\Fields\FieldsServiceInterface;
use Joomla\CMS\Form\Form;
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
use Joomla\CMS\MVC\Factory\MVCFactoryServiceTrait;
use Joomla\CMS\MVC\Factory\MVCFactoryServiceInterface;
use Joomla\CMS\Workflow\WorkflowServiceInterface;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
use Joomla\Component\Content\Administrator\Service\HTML\AdministratorService;
use Joomla\Component\Content\Administrator\Service\HTML\Icon;
use Psr\Container\ContainerInterface;
Expand All @@ -29,10 +34,11 @@
/**
* Component class for com_content
*
* @since 4.0.0
* @since __DEPLOY_VERSION__
*/
class ContentComponent extends MVCComponent implements
BootableExtensionInterface, CategoriesServiceInterface, FieldsServiceInterface, AssociationServiceInterface
BootableExtensionInterface, MVCFactoryServiceInterface, CategoriesServiceInterface, FieldsServiceInterface,
AssociationServiceInterface, WorkflowServiceInterface
{
use CategoriesServiceTrait;
use AssociationServiceTrait;
Expand All @@ -49,7 +55,7 @@ class ContentComponent extends MVCComponent implements
*
* @return void
*
* @since 4.0.0
* @since __DEPLOY_VERSION__
*/
public function boot(ContainerInterface $container)
{
Expand All @@ -69,7 +75,7 @@ public function boot(ContainerInterface $container)
*
* @return string|null The new section
*
* @since 4.0.0
* @since __DEPLOY_VERSION__
*/
public function validateSection($section, $item = null)
{
Expand Down Expand Up @@ -102,7 +108,7 @@ public function validateSection($section, $item = null)
*
* @return array
*
* @since 4.0.0
* @since __DEPLOY_VERSION__
*/
public function getContexts(): array
{
Expand All @@ -123,10 +129,68 @@ public function getContexts(): array
*
* @return string|null
*
* @since 4.0.0
* @since __DEPLOY_VERSION__
*/
protected function getTableNameForSection(string $section = null)
{
return '#__content';
}

/**
* Method to filter transitions by given id of state.
*
* @param array $transitions The Transitions to filter
* @param int $pk Id of the state
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function filterTransitions($transitions, $pk): array
{
return ContentHelper::filterTransitions($transitions, $pk);
}

/**
* Adds Count Items for Category Manager.
*
* @param \stdClass[] $items The category objects
* @param string $section The section
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function countItems(array $items, string $section)
{
return ContentHelper::countItems($items);
}

/**
* Prepares the category form
*
* @param Form $form The form to prepare
* @param array|object $data The form data
*
* @return void
*/
public function prepareForm(Form $form, $data)
{
ContentHelper::onPrepareForm($form, $data);
}

/**
* Method to change state of multiple ids
*
* @param array $pks Array of IDs
* @param int $condition Condition of the workflow state
*
* @return boolean
*
* @since __DEPLOY_VERSION__
*/
public static function updateContentState($pks, $condition): bool
{
return ContentHelper::updateContentState($pks, $condition);
}
}
Loading