- Merge request !19Issue #3270462: Set a default value in the publish / unpublish state dropdowns β (Open) created by smustgrave
- π¬π§United Kingdom jonathan1055
The new MR was still pointing to 8.x-1.x so changed the target branch to 2.x
I came back to this issue because this is the one which unsets the '_none' option. I was working on #3298371: Can't save some nodes after updating to 8.x-1.4 β which seems to be all about the '_none' option not being in the dropdown list, and I thought that this change had already been committed.
- First commit to issue fork.
- π¬π§United Kingdom jonathan1055
Thank you @mrshowerman, that is the correct way to do this. It fixed 6 of the 8 failing tests because Media does not have a 'type' property.
- First commit to issue fork.
- last update
over 1 year ago 36 pass, 2 fail - last update
over 1 year ago 51 pass - Status changed to Needs review
over 1 year ago 10:39am 19 April 2023 - last update
over 1 year ago 51 pass - π§πͺBelgium JeroenT π§πͺ
A patch that works with 2.0.0-beta1 (for composer patches).
- last update
over 1 year ago 51 pass - Status changed to Needs work
over 1 year ago 5:53pm 22 April 2023 - π¬π§United Kingdom jonathan1055
Thanks for this @JeroenT
The two coding standards problems can be fixed by simply deleting the 'and' because the #states visible conditions are always 'AND'ed together.We need test coverage for the new functionality, because I have just tried locally intentionally setting the visibility wrongly and all tests pass. Not surprising because the #states visibility is new functionality.
- π¬π§United Kingdom jonathan1055
I still think that any publish/unpublish state value should be removed during save if no scheduled date is entered. This was discussed above in #8 point (b), #15 and #16. Previously we would have had '_none' as a state, but now we get the actual value saved instead. Yes it might still work OK for the editor user at the moment, but having a publish state value in the entity when there is no date to use just feels wrong, and may come back to hurt us in future.
- last update
7 months ago Unable to generate test groups - π§πͺBelgium dieterholvoet Brussels
I added a submit handler that empties the state fields if the date fields are empty. I think all that's left to do now are tests.
- last update
7 months ago Unable to generate test groups - First commit to issue fork.
- π¬π§United Kingdom mjpa
I've added a commit (I think/hope!) to the issue fork to allow publish state / unpublish state to be in the form without the other. The logic check of both not existing doesn't let 1 of the fields being in the form by itself.
- last update
7 months ago Unable to generate test groups - last update
7 months ago Unable to generate test groups - πΊπΈUnited States capysara
As a patch, the MR works and it also applies to the latest 3.0.3.
However, I'm not sure if this is a complete solution because, in my case, it was misleading. Maybe an edge case, but somehow I had a node had been previously been saved without a value in the publish_state field. In the UI, it visually showed the default Publish State: Published, and since the node had already been saved and I thought that the validation prevented it from being saved without publish_state having a value, I assumed that the value was selected when it was actually empty.
In 3312463 β , it was reported that it's possible to save publish state as empty or none, but I haven't been able to intentionally recreate that behavior.
- Merge request !71Set a default value in the publish / unpublish state dropdowns; make fields conditional. β (Open) created by capysara
- πΊπΈUnited States capysara
capysara β changed the visibility of the branch 3.0.x to hidden.
- πΊπΈUnited States capysara
capysara β changed the visibility of the branch 3270462-conditional-fields to hidden.
- πΊπΈUnited States capysara
Created a MR against 3.0.x and hiding earlier branches and the patch.
I didn't make any changes to the MR except to reroll it.