archi: [BUG][ALASQL, HTMLReport] ViewsContent.contentid field doesn't contain valid model elements id

Version of Archi, Operating System

Archi version: 4.6 Linux

Usecase

Extract data from HTML report using AlaSQL query.

Expected Behaviour

AlaSQL query: SELECT * FROM ViewsContent INNER JOIN Views ON ViewsContent.viewid = Views.id WHERE Views.name LIKE '%ViewName%' AND ViewsContent.contenttype LIKE 'DiagramModelArchimateObject'

Returns table containing elements id as contentid.

Actual Behaviour

Value contained in ViewsContent.contentid field could not be found amongst model elements.

Archi forum discussion

https://forum.archimatetool.com/index.php?topic=796.0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (10 by maintainers)

Commits related to this issue

Most upvoted comments

I’ve just commited a fix. Will be in EA3

This si my temporal fix solution. […]

¿Please can you validate my solution? … whis work for my test.

Hi,

This is almost good, but :

1/ You have to use .ArchimateElement and .ReferencedModel also for contenttype:

Line 83 becomes:

dataViewsContent.push({viewid:"^view.Id^", contentid:"^c.ArchimateElement.Id^", contenttype:"^c.ArchimateElement.Class.SimpleName^"});

Line 85 becomes:

dataViewsContent.push({viewid:"^view.Id^", contentid:"^c.ReferencedModel.Id^", contenttype:"^c.ReferencedModel.Class.SimpleName^"});

Note: I haven’t tested it, but that’s the way it should be.

@Phillipus : I’ll test later today and will commit a fix.