I have some questions for notes :
I update notes as below code:
Hi Zhencheng,
<span style=“font-size: 9pt; font-family: “Courier New”;”>Project projWithNotes = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new <span style=“font-size: 9pt; font-family: “Courier New”;”>Project(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“ProjectWithNotes.mpp”<span style=“font-size: 9pt; font-family: “Courier New”;”>);
Task tsk = projWithNotes.getRootTask().getChildren().getById(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>1<span style=“font-size: 9pt; font-family: “Courier New”;”>);
System.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>out<span style=“font-size: 9pt; font-family: “Courier New”;”>.println(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“Notes Text:” <span style=“font-size: 9pt; font-family: “Courier New”;”>+ tsk.get(Tsk.<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:#660E7A”>NOTES_TEXT<span style=“font-size: 9pt; font-family: “Courier New”;”>));
tsk.set(Tsk.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>NOTES_TEXT<span style=“font-size: 9pt; font-family: “Courier New”;”>, <span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“Changing the notes
1<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>\r\n<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>Changing the notes 2<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:navy”>\r\n<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>Changing the notes 3<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:navy”>\r\n<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>Changing the notes 4<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:navy”>\r\n<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>”<span style=“font-size: 9pt; font-family: “Courier New”;”>);
projWithNotes.save(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“SavedProjectWithNotesJava.xml”<span style=“font-size: 9pt; font-family: “Courier New”;”>, SaveFileFormat.<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:#660E7A”>XML<span style=“font-size: 9pt; font-family: “Courier New”;”>);
kashif.iqbal:Hi Zhencheng,Thank you for contacting Aspose support team.If we update the project and save it as XML file, the notes are updated, however if we save the project as MPP file, the notes are not updated. This issue is logged under Id: TASKSJAVA-200 for further investigation by the product team. You will be notified once any update is received in this regard.To save the line break in notes, please use following sample code.Project projWithNotes = new Project("ProjectWithNotes.mpp");
Task tsk = projWithNotes.getRootTask().getChildren().getById(1);
System.out.println("Notes Text:" + tsk.get(Tsk.NOTES_TEXT));
tsk.set(Tsk.NOTES_TEXT, "Changing the notes 1\r\nChanging the notes 2\r\nChanging the notes 3\r\nChanging the notes 4\r\n");
projWithNotes.save("SavedProjectWithNotesJava.xml", SaveFileFormat.XML);
One more issue, if I set the notes with Chinese, then the notes will display ??? question mark.
Hi Zhencheng,
guozhencheng:kashif.iqbal:Hi Zhencheng,Thank you for contacting Aspose support team.If we update the project and save it as XML file, the notes are updated, however if we save the project as MPP file, the notes are not updated. This issue is logged under Id: TASKSJAVA-200 for further investigation by the product team. You will be notified once any update is received in this regard.To save the line break in notes, please use following sample code.Project projWithNotes = new Project("ProjectWithNotes.mpp");
Task tsk = projWithNotes.getRootTask().getChildren().getById(1);
System.out.println("Notes Text:" + tsk.get(Tsk.NOTES_TEXT));
tsk.set(Tsk.NOTES_TEXT, "Changing the notes 1\r\nChanging the notes 2\r\nChanging the notes 3\r\nChanging the notes 4\r\n");
projWithNotes.save("SavedProjectWithNotesJava.xml", SaveFileFormat.XML);Hi Kashif,I got a new issue about notes, when the notes include "\r\n", the notes will disappear, this will happened on Linux operating system.
Hi Zhencheng,
We have tested this issue on Ubuntu and the latest version of the API i.e. Aspose.Tasks for Java 9.4.0 but were not able to observe the problem of empty notes as you have mentioned. The above code was executed for testing the issue. Please check the attached input and output files for your reference and let us know your feedback. Please rename the file to intput.MPP and output to .xml file for correct viewing.
The issues you have found earlier (filed as TASKSJAVA-200) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.