Free Support Forum - aspose.com

RRULE Problems

Hi Aspose

Using the below ICS file and code, running Aspose.Email for Java 17.2, we receive the error ‘class com.aspose.email.system.exceptions.ArgumentOutOfRangeException: Specified argument was out of the range of valid values’ when creating the MapiMessage. This error is being generated by the RRULE, although the ics file can be dragged into Outlook correctly. Can you please explain what we are doing wrong?

Thanks

ICS file
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IONET Software//NONSGML Notes 9.0.1//EN_C
METHOD:PUBLISH
BEGIN:VEVENT
CLASS:PUBLIC
DTSTART:20170605T020000Z
DTEND:20170605T030000Z
RRULE:FREQ=WEEKLY;COUNT=4
TRANSP:OPAQUE
LAST-MODIFIED:20170327T204644Z
DTSTAMP:20170327T204620Z
SEQUENCE:0
SUMMARY:Weekly meeting test
UID:84FCD93F048970D6CC2580F00071FF27
END:VEVENT
BEGIN:VEVENT
CLASS:PUBLIC
DTSTART:20170612T040000Z
DTEND:20170612T050000Z
TRANSP:OPAQUE
RECURRENCE-ID:20170612T020000Z
LAST-MODIFIED:20170327T212647Z
DTSTAMP:20170327T204620Z
SEQUENCE:1
SUMMARY:Weekly meeting test
UID:84FCD93F048970D6CC2580F00071FF27
END:VEVENT
END:VCALENDAR

Code
PersonalStorage pst = null;
AppointmentLoadOptions apptLO;
Appointment calDoc;
MailMessage calMsg;
MapiMessage calMapiMsg;
FolderInfo calFolder;
MapiCalendar mapiCal;

try {
String pathPSTFileStr = “c:\temp\testPST.pst”;
String testFile = “c:\temp\test.ics”;
pst = PersonalStorage.create(pathPSTFileStr, 0);
apptLO = new AppointmentLoadOptions();
apptLO.setApplyLocalTZ(true);
calDoc = Appointment.load(testFile, apptLO);
calMsg = new MailMessage();
calMsg.addAlternateView(calDoc.requestApointment());
calMapiMsg = MapiMessage.fromMailMessage(calMsg); //error here
calFolder = pst.createPredefinedFolder(“Calendar”, StandardIpmFolder.Appointments);
mapiCal = (MapiCalendar)calMapiMsg.toMapiMessageItem();
calFolder.addMapiMessageItem(mapiCal);
}
catch(Exception e) {
System.out.println("Import Error : " + e.toString());
}
finally {
pst.dispose();
}

Hi Peter,


Thank you for contacting Aspose.Email support team.

I have checked the sample code and ICS file using a valid license and observed no issue. It seems that you are not using a valid license in your testing which is causing this exception. Its evaluation version limitation as mentioned here. You may please use a valid license in your testing.

If you need a temporary license for 30 days to check the complete functionality without any limitation. please follow this link. Use this temporary license and share the feedback.

Hi Kashif

Thanks for your reply. We have a valid license so I’m not sure why it isn’t being used. I’ll check this and reply here if there are still issues.

Thanks

Hi Peter,


Thank you for the feedback and feel free to write us back if you have any other query in this regard.

Hi Kashif

By applying the license the initial problem has gone away, however Aspose still ignores the RECURRENCE-ID value.

For example, when dragging the ICS file manually into Outlook, we see 4 meetings, starting 5 June. The meeting 12 June is correctly changed to the specified time based on the RECURRENCE-ID value. This does not happen when importing using Aspose.Email, regardless of including timezone information or using UTC times. All meetings have the same time.

Another problem is that when opening the imported entries, the dates and times are incorrect in the information area at the top of the meeting, e.g. ‘Occurs every…’.

Thanks

Hi Peter,


Could you please elaborate the problem you are facing with the help of some screenshots? We have repeated the steps but were not able to reproduce either of these at our end. The only difference we noted was the Time which is due to the system clock Timezone. Please share more details in the form of screenshots for further analysis at our end.

Hi Kashif

Yes for sure. In the first image, the ics file has been dragged into Outlook. This correctly reads the RECURRENCE-ID value in the second VEVENT, identifies it as the second entry in the recurring (first) VEVENT, and changes the time of that meeting to 10am.

In the second screenshot (created using Aspose), this does not happen, and all times are still 9am.

Please note I changed the times slightly in the ICS file, as below.

Regards

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IONET Software//NONSGML Notes 9.0.1//EN_C
METHOD:PUBLISH
BEGIN:VEVENT
CLASS:PUBLIC
DTSTART:20170605T090000
DTEND:20170605T100000
RRULE:FREQ=WEEKLY;COUNT=4
TRANSP:OPAQUE
LAST-MODIFIED:20170327T204644Z
DTSTAMP:20170327T204620
SEQUENCE:0
SUMMARY:Weekly meeting test
UID:84FCD93F048970D6CC2580F00071FF27
END:VEVENT
BEGIN:VEVENT
CLASS:PUBLIC
DTSTART:20170612T100000
DTEND:20170612T110000
TRANSP:OPAQUE
RECURRENCE-ID:20170612T090000
LAST-MODIFIED:20170327T212647Z
DTSTAMP:20170327T204620Z
SEQUENCE:1
SUMMARY:Weekly meeting test
UID:84FCD93F048970D6CC2580F00071FF27
END:VEVENT
END:VCALENDAR

Hi Peter,

I have tested the scenario again using Aspose.Email for Java 17.2.0 and 17.3.0 both. The calendar recurrence event is added fine similar to the original ICS file where second recurrence starts at 10 am as shown in the attached image. You may please test the scenario using latest library also and share the feedback.

I have used your latest ICS file and original code in testing. Output PST file is attached here for your reference.

Hi Kashif

Thanks for that. We can see that with 17.2.0 and 17.3.0 the times change correctly. However we still have a problem with exceptions to a weekly pattern. In the following ICS file, the event on 27.4 should change to 28.4, but what happens is that the event is listed twice, on both 27.4 and 28.4, so the Recurrence-ID is not correctly handled. Can you please confirm if you also see this?

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IONET Software//NONSGML Notes Release 9.0.1//EN
BEGIN:VEVENT
CLASS:PUBLIC
TRANSP:OPAQUE
DTSTART:20170420T090000
DTEND:20170420T100000
DTSTAMP:20170403T214815Z
LAST-MODIFIED:20170406T025540Z
SEQUENCE:0
RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=5
ORGANIZER;CN=Joe User:mailto:juser@ionet.co.nz
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Bob User:mailto
:buser@ionet.co.nz
UID:81F0D4A687D7BDB9CC2580F70077C65A
SUMMARY:Repeat weekly meeting one day different
DESCRIPTION:Some Rich Text
END:VEVENT
BEGIN:VEVENT
CLASS:PUBLIC
TRANSP:OPAQUE
RECURRENCE-ID:20170427T090000
DTSTART:20170428T090000
DTEND:20170428T100000
DTSTAMP:20170403T214818Z
LAST-MODIFIED:20170406T035540Z
SEQUENCE:1
ORGANIZER;CN=Joe User:mailto:juser@ionet.co.nz
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Bob User:mailto
:buser@ionet.co.nz
UID:81F0D4A687D7BDB9CC2580F70077C65A
SUMMARY:Repeat weekly meeting one day different
DESCRIPTION:Some Rich Text
END:VEVENT
END:VCALENDAR

Hi Peter,


Thank you for contacting Aspose support team again.

This issue is re-produced and logged under Id: EMAILJAVA-34256 for further investigation by the product team. You will be automatically notified once any update is received in this regard.

Thanks Kashif

I think there are other issues with RRULE support also - for example in the following ICS file, if I use an interval of 3 (or 5 or 6), the interval is handled correctly, but the start date is 2 days late. If I change the interval to 1, 2 or 4, everything is fine…

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IONET Software//NONSGML Notes Release 9.0.1//EN
BEGIN:VEVENT
CLASS:PUBLIC
TRANSP:OPAQUE
DTSTART:20170508T090000
DTEND:20170508T100000
DTSTAMP:20170403T220319Z
LAST-MODIFIED:20170406T025536Z
SEQUENCE:0
RRULE:FREQ=DAILY;INTERVAL=3;COUNT=10
ORGANIZER;CN=Joe User:mailto:juser@ionet.co.nz
UID:48B94C76C5FD8B80CC2580F70079274D
SUMMARY:Repeat Test 3
DESCRIPTION:Some Text
END:VEVENT
END:VCALENDAR

Hi Peter,


This issue is re-produced and logged under Id:EMAILJAVA-34257 for further investigation by the product team. You will be notified once any update is received in this regard.

P.S. If you find more issues, please report it in a separate new thread. It helps us to follow up the issues properly.

I will, thanks Kashif.

Hopefully your developers can test all permutations of RRULES - finding that parameter values can change the behaviour like this is a bit worrying.

Thanks

Hi Peter,


We regret the inconvenience caused to you and have further logged your concerns against the registered ticket. Our Product team will consider these while resolving the issue. We’ll update you here once there is any further information or a fix version available in this regard.

The issues you have found earlier (filed as EMAILJAVA-34256;EMAILJAVA-34257) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan