Book a Demo

Author Topic: [Bug][12.1]Doc generation from a search  (Read 6013 times)

Higgs

  • EA Novice
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
[Bug][12.1]Doc generation from a search
« on: January 31, 2016, 04:21:31 am »
Hello,

Here are the steps that I think triggers a bug.

1. I create a new project, calling it MyBugTest. Select no model patterns in the wizard. I just want an empty project.


2. I create a new view called BugTest, and then add a new Extended/Custom diagram, also called BugTest.
3. In this I create, i.e. drag and drop two Packages from the Toolbox and I choose “Package Only” to not get a diagram. Names as default, i.e. Package1 and Package2


4.   Next, I create a new view called Doc in which I create a new Extended/Documentation diagram. To this I drag (create) a Master Document object that I call MDoc. This, ofc, automatically creates a diagram under the MDoc view with the same name.
5.   I open this diagram and add a Model Document object. I just let the name be auto generated to “Class1”.
6.   In order to get some objects to generate, I drag the two packages onto the Class1 Model Document Object.


7.   I then create a very simple document template by just selecting menu Package/Documentation/Document Template which creates a new blank template.
8.   The only thing I do here is tick the “Package” section. (This automatically ticks the child packages.).
9.   I right click in the template and let it just fetch and print the package name.
10.   I then save this template as MyTemplate1


11.   I now double-click on the Class1 object and set the RTF template to MyTemplate1 under Tags.


12.   If I now mark the Master Document, click F8 and generates and then Views the document I get exactly what’s expected.


13.   Result:


So the generator works as it should.
14.   However, instead of dragging packages onto the Model Document to list objects that the template will iterate over you can use a search.
15.   This is where it will fail.
16.   To demonstrate I create a new Model Document Object (named Class2) just below the first one, in the MDoc diagram.
17.   To check the search I will use, I press CTRL-F and test a simple search with the search term “Package”


18.   This shows the results as the two Packages.
19.   I now set the tags of the Class2 Model Document object to, a) use the same template as before, and b) set the search to use.


20.   I then mark the Master Document, press F8 and generate/view the result.
21.   The result I would expect is the two package names being shown twice. One generated by the Class1 and one by the Class2.
But instead I get the following:


Instead of letting the template “run” and generate content, it has just added the template content.
Bug?
Or did I make a mistake somewhere?
The generation by Class1, i.e. the top Package1 Package2 text shows that the template works.
The weird thing is that It seems to work for Class2 using some templates.
If I just pick one of the templates that came with EA, the model report one. I get the Class2 to generate.


Result


« Last Edit: February 02, 2016, 05:22:56 pm by Higgs »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: [Bug?][12.1]Doc generation from a search
« Reply #1 on: January 31, 2016, 05:00:35 am »
Yes, it's a bug (I think)

Just make sure to report it it Sparx using the link on the bottom of the page http://sparxsystems.com/support/forms/bug_report.html

I've noticed that something things go wrong if the template has not enough newlines between different sections.
Try added an empty line right after {Pkg.Name}

Geert

Higgs

  • EA Novice
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: [Bug?][12.1]Doc generation from a search
« Reply #2 on: January 31, 2016, 05:53:52 am »
Aye, I've posted it with the Bug Report as well.

Higgs

  • EA Novice
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: [Bug?][12.1]Doc generation from a search
« Reply #3 on: February 02, 2016, 05:22:35 pm »
This have been confirmed as a bug by the support.