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

Resolves issues related to the setting of a schedule for content publishing #17868

Open
wants to merge 13 commits into
base: v15/dev
Choose a base branch
from

Conversation

AndyButland
Copy link
Contributor

@AndyButland AndyButland commented Dec 30, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

Addresses issues raised in #17031, tracked under AB 45476 (internal HQ tracker)

Also #17830 tracked under AB 47430

Description

Reported issue:

#17031 describes several issues related to the setting and reading of scheduled publishing details:

  1. It's not possible to see if a page is scheduled in the "info" section of the page.
  2. You cannot schedule an item that has not been saved yet.
  3. If you try to publish an item that has been scheduled you will get an error:
  4. If you click into "schedule" on an already scheduled page the dates for the previous schedule are not displayed.
  5. There is no conversion between local and server time on save and display of the scheduled dates.
  6. A previously set scheduled date can't be cleared.

Resolution:

With the PR merged, these issues will be addressed as follows:

  1. In Umbraco 13 the details of the schedule were displayed in the "Info" tab when editing content. I've added that back now:
  1. Conditions have been added now so that all the actions available as workspace action button extensions - unpublish, publish with descendants and schedule - no longer appear until the content has been saved for the first time. They all error if called on a new content item that hasn't yet been saved.
  2. Getting an error presented when trying to publish and item that has been scheduled is correct behaviour, or at least aligns with what we have on 13, so I've made no changes to this.
  3. Previously selected schedule is now displayed when returning to the dialog to view or change the schedule.
  1. A conversion is now made between the local and server time when saving and presenting the schedule. There's no conversion when running locally as of course the server and local time are the same, but this update should resolve issues where the times aren't the same, and aligns with the behaviour we had on 13.
  2. A previously set schedule can now be cleared.

To Test:

  • Use the schedule dialog for a new and existing content item to verify issues 1, 2, 4 and 6 are resolved.
  • Ideally set up a Cloud site and use via a PC with a local time different to the server time, with the amends from this PR in place. Verify that the saved schedule is saved to the database with the same value as we have in an Umbraco 13 site (in umbracoContentSchedule), which will indicate that issue 5 is resolved.

# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/Document/ByKeyDocumentController.cs
#	src/Umbraco.Cms.Api.Management/Factories/IDocumentPresentationFactory.cs
#	src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentVariantResponseModel.cs
#	src/Umbraco.Core/Services/ContentPublishingService.cs
#	src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/manifests.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/types.ts
#	src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/publish-with-descendants/workspace-action/manifests.ts
@AndyButland
Copy link
Contributor Author

I've combined this with the work @Migaroez did in #17535, as we'd overlapped slightly. Have picked out his updates and ensured they worked with mine in the UI.

It's working a lot better now in terms of saving a schedule and having it displayed in the UI again so you can view and edit it.

The only issue I can still see is for variant content, in that when you view or set the schedule, you don't see the previous schedule of the non-active variant.

E.g. here I'm looking at English and have clicked the Schedule button:

image

Which correctly shows the previously set English schedule and has the Italian one hidden. But if I click to view or set the Italian one, I don't see the previously set schedule:

image

It's OK though if I've made a change to the Italian content.

I can kind of see why... but it seems that this dialog has really been built around displaying data for the active or changed variants. Here that doesn't seem right - seems we should be able to see and set a schedule for a non-active and non-changed variant,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants