openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Unexpected error of PlanningCalendar after version upgrade

Open malkoto1 opened this issue 5 years ago • 16 comments

OpenUI5 version: 1.87.0

Browser/version (+device/version): Latest Chrome and Latest Firefox

URL (minimal example if possible): Cannot provide

We have application using PlannigCalendarControl. Our current version is 1.81.1. If we upgrade to 1.87.0 error is thrown.

Steps to reproduce the problem:

  1. Just upgrade version from 1.81.1 to 1.87.0

What is the expected result? Expected is everything to work.

What happens instead? Error "CalendarUtils-dbg.js:139 Uncaught TypeError: Cannot read property 'getTime' of undefined"

Any other information? (attach screenshot if possible) image

malkoto1 avatar Mar 24 '21 10:03 malkoto1

Hello @malkoto1, As this issue cannot be reproduced by the provided information, to help us analyze it can you provide a minimal example to reproduce in e.g. jsbin: isolate the application code which triggers the issue and strip it down as much as possible as long as the issue still occurs if several files are required, you can create a gist. Best Regards, Konstantin

kskondov avatar Mar 24 '21 10:03 kskondov

I cannot isolate it, but I have isolated the versions where it starts to show:

I can upgrade up to 1.81.7 and if I try to go to 1.82.0 the error starts to show.

Maybe you can point me what has happened between 1.81.7 and 1.82.0?

malkoto1 avatar Mar 24 '21 10:03 malkoto1

Hello @malkoto1, We found a change that might be the cause of the issue in the _focusDateExtend method of the CalendarDateIntervalMethod the old method was:

CalendarDateInterval.prototype._focusDateExtend = function(oDate, bOtherMonth, bNoEvent) {
		if (bOtherMonth) {
			var oOldStartDate = this._getStartDate(),
				oNewStartDate = new CalendarDate(oDate.getYear(), oDate.getMonth(), oOldStartDate.getDate(), this.getPrimaryCalendarType());

			this._setStartDate(oNewStartDate, false, true);

			if (!bNoEvent) {
				return true; // fire startDateChange event in caller at end of processing
			}
		}

		return false;

Can you please check If this can help you solve the issue, if not we will need more information like

  1. Detailed steps to reproduce the problem
  2. Debugging information etc.

Best Regards, Konstantin

kskondov avatar Mar 24 '21 14:03 kskondov

Hi,

I put a breakpoint in that method and my code is not reaching it before the error.

I am binding data az in the example. The only difference is that instead of provideing a Date object directly I am providing an ISO Date string and am parsing it like this: startDate="{path:'managedEmployees>start', formatter:'.parseDateTime'}"

Is there a possibility that you have changed something in that logic?

malkoto1 avatar Mar 24 '21 18:03 malkoto1

Hello @, I have discussed this issue with the responsible team and created an internal incident 2170074748. The status of the issue will be updated here in GitHub. Regards, Konstantin

kskondov avatar Mar 26 '21 13:03 kskondov

Hi there,

Is there any update here?

Kind Regards, Radoslav

malkoto1 avatar Apr 07 '21 07:04 malkoto1

Hi malkoto1,

a colleage send me the recording of your debugging session. We're discussing it internally, but we need more infos. Could you please try again and put a breakpoint in CalendarUtils#106, after the oUTCDate instantiation?

Also FYI sap.ui.unified.Calendar.CalendarUtils._createUniversalUTCDate(..) was undefined because you need to use a lower-captial c: sap.ui.unified.calendar.CalendarUtils._createUniversalUTCDate(..)

Best Regards, Oliwer

1110101 avatar Apr 19 '21 08:04 1110101

Hi,

I have managed to get to the point where oUTCDate is undefined in the CalendarUtils._createUTCDate function. I am attaching screenshots from the stack trace in a zip. You can see on the last one that one of the events has lost its startDate and endDate (at least this is my suggestion).

These are made with 1.88.0 version.

After this the error in the beginning of the ticket was thrown.

Screenshots.zip

malkoto1 avatar Apr 20 '21 12:04 malkoto1

Hello,

Is there any movement here?

Kind Regards, Radoslav

malkoto1 avatar May 18 '21 13:05 malkoto1

Hi malkoto1, we are discussing your issue internally... We do not have any update at the moment...

Best regards Alex

alexanderriess avatar Jun 08 '21 08:06 alexanderriess

Hi Alex,

After a short screensharing session with a colleague of yours, Boyan, we concluded where the problem might be.

As our setup is difficult, I can offer to meet with someone from the team that seemed to know where might the issue be.

Kind Regards, Rado

malkoto1 avatar Jun 14 '21 07:06 malkoto1

Hello @malkoto1 ,

Can we make a new meeting, to re-check the issue and investigate the problem, as the setup is not easy.

Thanks and Best Regards, Tsanislav

tsanislavgatev avatar Jul 02 '21 07:07 tsanislavgatev

Hi,

Yes, let's do that.

For more convenience, let's move the conversation to our mailboxes. Please send convenient slots for such a meeting on [email protected].

Kind Regards, Radoslav

malkoto1 avatar Jul 10 '21 08:07 malkoto1

Hello,

As we spoke in our meeting, you said that you will check the reason of creating the appointments/interval headers with no start/end date. As on our end, we don't have major changes between the pointed versions. This might be if we just worked faster in the newer version and the information wasn't yet loaded by your application.

Can you please update if you have update on your research?

Best Regards, Tsanislav

tsanislavgatev avatar Aug 04 '21 11:08 tsanislavgatev

Hi @malkoto1 I'll close this issue due to inactivity. If you have an update on Tsanislav's response, feel free to comment again and we'll reopen the issue.

Regards, Georgi

georgimkv avatar Sep 07 '21 10:09 georgimkv

Hi,

We managed to fix the problem. We were giving all out dates in ISO string format which at some point was failing. We just removed everything that was different from Date object and everything is okay now.

malkoto1 avatar Oct 01 '21 15:10 malkoto1