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 preinstalled default category #23701

Merged

Conversation

bembelimen
Copy link
Contributor

Pull Request for Issue #23464 .

Summary of Changes

Set the uncategories category workflow selection to "use default" as described in the issue.

Testing Instructions

See #23464

@bembelimen bembelimen changed the base branch from staging to 4.0-dev January 28, 2019 13:00
@bembelimen bembelimen changed the title Workflow preinstalled default category [4.0] Workflow preinstalled default category Jan 28, 2019
@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on 8e1275c


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

@wojsmol
Copy link
Contributor

wojsmol commented Jan 28, 2019

@zero-24 Please fix rips issue.

@brianteeman
Copy link
Contributor

Just wondering what happens when you upgrade from j3 as they don't have a work flow set. Would it be better to not store anything in the category if it's going to be "use default" and instead make the code use default if no workflow is set.

@bembelimen
Copy link
Contributor Author

@brianteeman
Copy link
Contributor

Sorry you misunderstood me. It is indeed available but its not applied to all existing categories because it needs to be saved as "workflow_id":"use_default" in the params field. That would mean opening every category and saving it again to set the value. Unless I have misunderstood the code (and I might have) I am suggesting that if there is no workflow_id set then it will default to "use_default"

@bembelimen
Copy link
Contributor Author

Ah, now I understand, the expected default of the select is "use_default" (https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/forms/category.xml#L18).

When no workflow is assinged to the category, it falls back to the default one: https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/Model/ArticleModel.php#L1296

@brianteeman
Copy link
Contributor

so to be clear this pr could also have simply removed the "workflow_id":"1" instead of changing it to "workflow_id":"use_default"

thats what confused me

@bembelimen
Copy link
Contributor Author

Yes, that would have been working, too.

@brianteeman
Copy link
Contributor

Now its clear - thanks

@wilsonge wilsonge merged commit 506401f into joomla:4.0-dev Jan 30, 2019
@wilsonge
Copy link
Contributor

Thanks!

@wilsonge wilsonge added this to the Joomla 4.0 milestone Jan 30, 2019
@bembelimen bembelimen deleted the workflow-preinstalled-default-category branch July 15, 2019 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants