Setting MapiTask category doesn't work

Hello,

I need a help to set a task category using Aspose.Email for Java 20.9.
I’m using the following code but Outlook doesn’t recognize the category:

MapiTask task = new MapiTask();
// setting other properties
// ...
String categories [] = { "Blue category" };
task.setCategories(categories);

Can anyone help me with this?

Thanks

@kelberuc

The code sample that you have shared seems fine. Can you please share working example and snapshot of incurring issue so that we may investigate further.

Hi @mudassir.fayyaz,

Attached to this reply there are 2 screenshots.

  1. screenshot_wrong.jpg - on this screenshot I show the result of my code on creating a new task and setting the category property. (Note that outlook does not show anything on category field)
  2. screenshot_correct.jpg - on this screenshot I manually set Blue category in Outlook for the task. (Note the category property being showed)

Thanks for your help
screenshots.zip (178.1 KB)

@kelberuc

I can see the issue in snapshot. However, the line of code that you have shared for adding cateogory is fine too. Therefore, I have requested you to please provide the working sample code along with generated output that I may test on my end using Aspose.Email for Java 20.9.1 and verify that.

Hi @mudassir.fayyaz,

Here is my code:

MapiTask task1 = new MapiTask();
task1.setSubject("New test task 1");
	      
String categories [] = { "Blue category" };
task1.setCategories(categories);
        
tasksFolder.addMapiMessageItem(task1); 

Thanks

@kelberuc

I have opened a ticket with ID EMAILJAVA-34758 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be addressed.

Hi @mudassir.fayyaz ,

Do you know when we will have a solution for this issue?
I’m depending on this in order to continue my project.

Thanks

@kelberuc

The concerned issue has just been included in our issue tracking system and we request for your patience. We will share the good news with you as soon as the issue will be addressed.

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