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

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

    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

          People

            Unassigned Unassigned
            ajayviswanathan Ajay Viswanathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: