You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2021/10/04 12:36:46 UTC

[GitHub] [zeppelin] zjffdu commented on a change in pull request #4240: [ZEPPELIN-5547] Rename note doesn't change the name field in file json

zjffdu commented on a change in pull request #4240:
URL: https://github.com/apache/zeppelin/pull/4240#discussion_r721321093



##########
File path: zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteManager.java
##########
@@ -246,6 +246,13 @@ public void moveNote(String noteId,
 
     // update notebookrepo
     this.notebookRepo.move(noteId, notePath, newNotePath, subject);
+
+    // save note if note name is changed, because we need to update the note field in note json.
+    String oldNoteName = getNoteName(notePath);
+    String newNoteName = getNoteName(newNotePath);
+    if (!oldNoteName.equalsIgnoreCase(newNoteName)) {

Review comment:
       Good point, Fixed

##########
File path: zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java
##########
@@ -78,7 +80,7 @@
 
   private Notebook notebook;
   private NoteManager noteManager;
-  private NotebookRepo notebookRepo;
+  private VFSNotebookRepo notebookRepo;

Review comment:
       Fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org