GitHub user doanduyhai opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/832

    [ZEPPELIN-741] Re-use existing paragraphId on note import

    ### What is this PR for?
    Upon note.json import, do not generate a new paragraphId but re-use the 
existing one. 
    
    This is important because the 
`z.angularBind()/z.angularUnbind()/z.runParagraph()` functions are pointing to 
static paragraphId
    
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [ ] - Code Review
    * [ ] - Test
    
    ### What is the Jira issue?
    **[ZEPPELIN-741]**
    
    ### How should this be tested?
    1. Create a paragraph with the following content:
    
    ```
    %md
    ## The paragraph id is         
**PUT_HERE_CURRENT_PARAGRAPH_ID**
    ## The new paragraph id is **${New_Paragraph_Id}**
    ```
    
    2. Retrieve the current paragraph id and replace the text 
**PUT_HERE_CURRENT_PARAGRAPH_ID** then re-execute the paragraph
    3. Export the paragraph as JSON
    4. Delete it
    5. Re-import it
    6. Retrieve the paragraph id again and put it in the input text form and 
then execute the paragraph
    7. Normally both paragraph ids should be the same
    8. Now clone the current note
    9. In the new note, retrieve the paragraph id again and put it in the input 
text form and then execute the paragraph
    10. Normally both paragraph ids now are different
    
    ### Screenshots (if appropriate)
    
![static_paragraph_id](https://cloud.githubusercontent.com/assets/1532977/14474821/332e64d4-00ff-11e6-9441-787bb09d73d1.gif)
    
    ### Questions:
    * Does the licenses files need update?  --> **No**
    * Is there breaking changes for older versions? --> **No**
    * Does this needs documentation? --> **Yes**
    
    [ZEPPELIN-741]: https://issues.apache.org/jira/browse/ZEPPELIN-741

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/doanduyhai/incubator-zeppelin ZEPPELIN-741

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-zeppelin/pull/832.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #832
    
----
commit 64cb8532108116949e4461a93fe56c317405407e
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-04-12T15:40:36Z

    [ZEPPELIN-741] Re-use existing paragraphId on note import

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to