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



##########
File path: 
zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
##########
@@ -317,15 +317,27 @@ public void renameNote(String noteId,
   }
 
   public String cloneNote(String noteId,
-                        String newNotePath,
-                        ServiceContext context,
-                        ServiceCallback<Note> callback) throws IOException {
+                          String newNotePath,
+                          ServiceContext context,
+                          ServiceCallback<Note> callback) throws IOException {
+    return cloneNote(noteId, "", newNotePath, context, callback);
+  }
+
+
+  public String cloneNote(String noteId,
+                          String revisionId,
+                          String newNotePath,
+                          ServiceContext context,
+                          ServiceCallback<Note> callback) throws IOException {
     //TODO(zjffdu) move these to Notebook
     if (StringUtils.isBlank(newNotePath)) {
       newNotePath = "/Cloned Note_" + noteId;
+      if(StringUtils.isNotEmpty(revisionId)) {
+        newNotePath += "_" + revisionId.substring(0, 6);

Review comment:
       Why calling substring(0, 6)?




-- 
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-unsubscr...@zeppelin.apache.org

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


Reply via email to