Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-3673

Cloning a notebook does not copy `noteParams`, `noteForms` and `config`

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.8.0
    • None
    • Core, rest-api, zeppelin-server
    • None

    Description

      Cloning a notebook only copies the `name` and `paragraphs` attributes of a `Note` object. It should also copy other attributes like `noteParams`, `noteForms` and `config`.

      Function `Note cloneNote` inside `org.apache.zeppelin.notebook.Notebook` is where the functionality lies

      ***

      Note newNote = createNote(subject);

      ***

      newNote.setName(newNoteName);

      ***
      newNote.setCronSupported(getConf());

      List<Paragraph> paragraphs = sourceNote.getParagraphs();
      for (Paragraph p : paragraphs) { newNote.addCloneParagraph(p, subject); }

      ***
      noteSearchService.addIndexDoc(newNote);
      newNote.persist(subject);
      return newNote;

      Is this an intended behavior, and if so what is the reason for it? If not, I'd like to raise a PR for the same. 

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            ajayviswanathan Ajay Viswanathan

            Dates

              Created:
              Updated:

              Slack

                Issue deployment