-
Notifications
You must be signed in to change notification settings - Fork 39
Fix that scheduling an event currently in progress gives you the wrong error message #1411
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
base: develop
Are you sure you want to change the base?
Fix that scheduling an event currently in progress gives you the wrong error message #1411
Conversation
|
Hi @EnsiyehE |
|
Use Run test server using develop.opencast.org as backend: Specify a different backend like stable.opencast.org: It may take a few seconds for the interface to spin up. |
gregorydlogan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the error box is at the top of the modal, it doesn't prevent me from saving the change.
|
Hi Greg, Just to confirm my understanding — when you mentioned( in the issue #1076) that scheduling an event which is currently in progress gives the error "The event has already ended", did you mean events that have already started but not yet finished (so they’re ongoing right now)? If that’s the case, my “Add Event” window already handles this by showing an error message at the top of the modal and preventing the user from saving. I just want to make sure I’m interpreting the issue correctly and not misunderstanding what you meant. Thanks for clarifying! |
|
Sorry, yes I was unclear. What I meant was that I scheduled an event, and then after it starts but before it finishes I change end time. Effectively, shortening the event while it's in progress. In theory this is doable, but I would wager that most CAs don't update their schedules quickly enough to reliably be able to stop early. Thus, we should just not allow you to shorten an event which has already started. |
|
This pull request is deployed at test.admin-interface.opencast.org/1411/2025-11-18_14-24-52/ . |
Hello Greg, I hope you are doing well. I have now fixed the issue you mentioned. Please test the fix as follows: Set the start hour and minute to the current time (not a time in the past) so that the event is scheduled to start immediately. Choose your desired end hour and minute specifically You will see that if the event is already in progress and not yet finished, the end time cannot be shortened by the user. Best regards, |
|
This pull request has conflicts ☹ |
|
Hello Again , Sorry for the confusion i thought my previous solution might work , but my logic to disable the end time field was somehow wrong completely , now please test this PR as follow : if you choose a time like for example : 14:23 and the event has already getting started in one minute and then you choose the end time like 15:23 or 14:36 , after the event is started , you are not able to change the end time and you will see the following error message : " This event cannot be modified because it is currently in progress." please review and let me know the mistakes or points bests |
gregorydlogan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closer, but still not quite right.
I'm seeing The schedule could not be updated: You cannot schedule an event to be in the past., rather than the expected message.
Also I can still change the scheduled time, even with the message on the modal.
Screencast.from.2025-11-18.11-12-08.mp4
Hi Greg, Thank you for your feedback. It seems I may have misunderstood the requirements. I thought we needed to prevent changes to the end time once an event had already started. As you can see in the video, when I schedule an event that is about to start in one minute, once it begins I’m unable to change or shorten the end time that I originally set. Could you please take a look at the video and let me know your thoughts? Regarding setting an event in the past, I believe that’s related to another PR, not this one—right? bests |
|
Ok, I see whats happening. There are two (or more) bugs in play, and we're talking about different things.
So, leaving #1076 alone here, this PR does solve a valid bug. One further thing I would test though is what happens if you schedule something for 18:33, but don't actually click all the way through to the final submit button until 18:33 (or later)? Perhaps insisting on a small buffer would make sense if we're looking at times? 120 seconds? @Arnei, do we have other checks like this elsewhere? I would hope the backend would reject requests that close to now, but we should probably check that that doesn't work too... There were buffer requirements a long time ago, but I'm unsure if they're still enforced. |
|
Hi Greg, Sorry about the confusion — I misunderstood this issue twice. About the case where someone schedules an event for 18:33 but doesn’t click the final submit until 18:33 or later: I’m not sure what the correct solution is. Maybe we need a small buffer (like a few minutes), but I don’t know. What I did in this PR is: if an event has already started, the user cannot shorten it anymore. I thought this made sense because the problem seemed to me that it happens in the “Create Event " Schedule tab. ( as i said maybe a confusion from my side , sorry ) If you think this PR doesn’t really help, I can close it and instead work on the scheduling logic inside the Event Details Modal. |
I believe we do not have other checks like this in the admin interface. Can't think of anything besides scheduling that would need that. |
Hello all,
In this pull request, I added a new error message to address the issue described in #1076. Specifically, I improved the scheduling conflict detection by:
Keeping the existing date-only check for past events unchanged.
Adding a separate hour-only check for events that are currently in progress.
This ensures that ongoing events are correctly detected without affecting the logic for past events.."