Sonar Plugins

Export as a PDF report

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: PDFREPORT-0.1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    10

Description

All the projects are consolidated within an unique PDF report. The first page is a synthetic view of all the projects. Next pages are project details.

  1. Report Overview.bmml
    13/Feb/09 9:15 AM
    10 kB
    Freddy Mallet
  2. Results Outline.bmml
    13/Feb/09 9:15 AM
    2 kB
    Freddy Mallet
  3. Sonar Executive Report.pdf
    13/Feb/09 9:15 AM
    87 kB
    Freddy Mallet
  4. sonar-report.pdf
    13/Jan/09 3:42 PM
    248 kB
    Antonio Manuel Muñiz Martín
  5. Violations summary.bmml
    13/Feb/09 9:15 AM
    1 kB
    Freddy Mallet
  1. Report Overview.png
    42 kB
    13/Feb/09 9:15 AM
  2. Results Outline.png
    53 kB
    13/Feb/09 9:15 AM
  3. sonar.png
    56 kB
    28/Dec/08 12:10 PM
  4. Violations summary.png
    39 kB
    13/Feb/09 9:15 AM

Issue Links

Activity

Hide
Michel Pawlak added a comment -

Hello Freddy,

Such a new feature would be great. However, in my opinion, being able to select the projects to be included in the synthetic view of the pdf report might be more interesting than including all of them.

Reports are targeted at managers, and thus only relevant information should be included in pdf reports. By the way, as you already know, it is for this the reason that I think that Sonar should group projects by administrative entities being in charge of them (for instance division A->projects x,y,z, etc.)

We could meet one day to exchange our ideas on what elements might be included in such a pdf report (or better what features could be offered to Sonar users in order to create their reports based on their preferences.)

All the best,

Michel Pawlak

Show
Michel Pawlak added a comment - Hello Freddy, Such a new feature would be great. However, in my opinion, being able to select the projects to be included in the synthetic view of the pdf report might be more interesting than including all of them. Reports are targeted at managers, and thus only relevant information should be included in pdf reports. By the way, as you already know, it is for this the reason that I think that Sonar should group projects by administrative entities being in charge of them (for instance division A->projects x,y,z, etc.) We could meet one day to exchange our ideas on what elements might be included in such a pdf report (or better what features could be offered to Sonar users in order to create their reports based on their preferences.) All the best, Michel Pawlak
Hide
Freddy Mallet added a comment -

Hello Michel,

You're true but that's not a surprise . I wanted to split this feature into three distinct features :

  • Generate an assessment report on a given project (targeted audience : quality assurance team and project manager )
  • Generate an actions list report on a given project (targeted audience : development team)
  • Generate an global quality dashboard report (targeted audience : direction)

Moreover, by projet, I mean each available levels of aggregated projects.
I'm going to contact you in order to exchange ideas on this subject.

See you soon,
Freddy

Show
Freddy Mallet added a comment - Hello Michel, You're true but that's not a surprise . I wanted to split this feature into three distinct features :
  • Generate an assessment report on a given project (targeted audience : quality assurance team and project manager )
  • Generate an actions list report on a given project (targeted audience : development team)
  • Generate an global quality dashboard report (targeted audience : direction)
Moreover, by projet, I mean each available levels of aggregated projects. I'm going to contact you in order to exchange ideas on this subject. See you soon, Freddy
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello.

I am working in this line. I started over sonar 1.5 branch.
First I will compose a simple PDF for a concrete project (pass as parameter). I am using a Java Servlet which act as controller for this feature. I have created a new module, sonar-pdf as a child of sonar father project. I have selected iText for PDF design and creation.

¿what do you think about my technology choice?

When I have something visible I will write and attach here.

Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hello. I am working in this line. I started over sonar 1.5 branch. First I will compose a simple PDF for a concrete project (pass as parameter). I am using a Java Servlet which act as controller for this feature. I have created a new module, sonar-pdf as a child of sonar father project. I have selected iText for PDF design and creation. ¿what do you think about my technology choice? When I have something visible I will write and attach here. Antonio.
Hide
Antonio Manuel Muñiz Martín added a comment -

Sorry, I forget something.

I will use REST API for retrieve data, so this module could be used in other projects for integration with sonar.

Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Sorry, I forget something. I will use REST API for retrieve data, so this module could be used in other projects for integration with sonar. Antonio.
Hide
Freddy Mallet added a comment -

Hello Antonio,

That sounds good.
Another option would have been to use XSL-FO, but as Sonar web interface uses lot of JavaScript, we wouldn't be able to reuse lot of xhtml code. Moreover, iText is more developerfriendly than XSL-FO.

If can give a little advise, start by developing a simple standalone java application that you can call in command line and make it retrieve data from Sonar through the REST API. When you will be happy with this first version, attach it to this ticket.

cheers,
Freddy

Show
Freddy Mallet added a comment - Hello Antonio, That sounds good. Another option would have been to use XSL-FO, but as Sonar web interface uses lot of JavaScript, we wouldn't be able to reuse lot of xhtml code. Moreover, iText is more developerfriendly than XSL-FO. If can give a little advise, start by developing a simple standalone java application that you can call in command line and make it retrieve data from Sonar through the REST API. When you will be happy with this first version, attach it to this ticket. cheers, Freddy
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello Freddy.

I have included one test in the module, when I execute mvn test it generates a result pdf consulting the REST API, this is an agile way to test my work. I will attach the complete module when I finish.

Thanks for your attention

Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hello Freddy. I have included one test in the module, when I execute mvn test it generates a result pdf consulting the REST API, this is an agile way to test my work. I will attach the complete module when I finish. Thanks for your attention Antonio.
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello.

I started the development of the module some days ago. First I have design a simple image for ilustrate the module idea (attached).

Even I have not clear the document structure:
1. One Chapter for main project (all metrics) and subchapters for subprojects (all metrics too).
2. One chapter for one metric, the meaning of the metric can be exposed on his chapter.

¿some advice?

Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hello. I started the development of the module some days ago. First I have design a simple image for ilustrate the module idea (attached). Even I have not clear the document structure: 1. One Chapter for main project (all metrics) and subchapters for subprojects (all metrics too). 2. One chapter for one metric, the meaning of the metric can be exposed on his chapter. ¿some advice? Antonio.
Hide
Antonio Manuel Muñiz Martín added a comment -

PDF Reporter Architecture

Show
Antonio Manuel Muñiz Martín added a comment - PDF Reporter Architecture
Hide
Freddy Mallet added a comment -

Hello Antonio,

For the first version of the pdf export module, I think solution 1 "one chapter for main project (all metrics) and subchapters for subprojects" is more valuable.

Freddy

Show
Freddy Mallet added a comment - Hello Antonio, For the first version of the pdf export module, I think solution 1 "one chapter for main project (all metrics) and subchapters for subprojects" is more valuable. Freddy
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello.

I have an early beta version of the module (and the first PDF report). By now I don´t attach much importance to visual design, only to technical design.
In this point I have a little cross of ways. Using the web service API I maintain the independency of the module (initial idea), but I loss a lot of data (as Tendency Analysis). I have three options:

1. Rewrite the code for this data (keeping the not-coupling way)
2. Acouple the pdf module logic to sonar-core logic (coupling way, the module can not be used out of sonar)
3. Develop the web service API for retrieve this data
4. Do nothing. The PDF report will not include this kind of data (really this is not a solution)

In my opinion, the best option is 3. Any advice will be valued.

Thanks.
Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hello. I have an early beta version of the module (and the first PDF report). By now I don´t attach much importance to visual design, only to technical design. In this point I have a little cross of ways. Using the web service API I maintain the independency of the module (initial idea), but I loss a lot of data (as Tendency Analysis). I have three options: 1. Rewrite the code for this data (keeping the not-coupling way) 2. Acouple the pdf module logic to sonar-core logic (coupling way, the module can not be used out of sonar) 3. Develop the web service API for retrieve this data 4. Do nothing. The PDF report will not include this kind of data (really this is not a solution) In my opinion, the best option is 3. Any advice will be valued. Thanks. Antonio.
Hide
Freddy Mallet added a comment -

Hello Antonio, for sure option 3 is the best one but I'm going to ask Simon if we can't provide you such web service API in the development trunk ...

Show
Freddy Mallet added a comment - Hello Antonio, for sure option 3 is the best one but I'm going to ask Simon if we can't provide you such web service API in the development trunk ...
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello Freddy,
Thanks, that would be great!

I have attached the first pdf report. I know, the design can be improved but I am interested in your views on the structure of the document.
I am completely open to suggestions.

Regards.

Show
Antonio Manuel Muñiz Martín added a comment - Hello Freddy, Thanks, that would be great! I have attached the first pdf report. I know, the design can be improved but I am interested in your views on the structure of the document. I am completely open to suggestions. Regards.
Hide
Antonio Manuel Muñiz Martín added a comment -

Sonar PDF Report (beta) on Sonar project

Show
Antonio Manuel Muñiz Martín added a comment - Sonar PDF Report (beta) on Sonar project
Hide
Simon Brandhof added a comment -

Hi Antonio,

Good job ! Tendencies are already published in the measures request. Nodes are not really well-named :

  • t_quant for "quantitative tendency" ! 1 if the value increase, else 0 or -1
  • t_qual for "qualitative tendency", 1 if measure is better. It takes metric direction into account. For example average complexity is better if it decreases (t_quant =-1 but t_qual=1)

For your information the measures API will be completed soon with alert results.

I hope it helps,
Simon

Show
Simon Brandhof added a comment - Hi Antonio, Good job ! Tendencies are already published in the measures request. Nodes are not really well-named :
  • t_quant for "quantitative tendency" ! 1 if the value increase, else 0 or -1
  • t_qual for "qualitative tendency", 1 if measure is better. It takes metric direction into account. For example average complexity is better if it decreases (t_quant =-1 but t_qual=1)
For your information the measures API will be completed soon with alert results. I hope it helps, Simon
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello Simon,

Thanks, I'm glad to read this, yes, it helps. There is still much work for obtain a good pdf report.
In that case, the only obstacle is SONAR-563.

Thanks for the info.

Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hello Simon, Thanks, I'm glad to read this, yes, it helps. There is still much work for obtain a good pdf report. In that case, the only obstacle is SONAR-563. Thanks for the info. Antonio.
Hide
Antonio Manuel Muñiz Martín added a comment -

Hi.

I have attched a snapshot of sonar-pdf. This a snapshot version, but I think that is a good start for the module.
The module has been developed as part of Sonar (maven module), with modifications in sonar-web for access to PDF reports, but it can be compiled/tested separately and I have isolated the module to try out of Sonar.

For now, I have only one test, this test generates a PDF report of Sonar project (accesing to nemo.sonar.codehaus.org).
You can execute the test with: "mvn test".

There are still many things to do, I am working on this.

Your comments will be welcome!

Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hi. I have attched a snapshot of sonar-pdf. This a snapshot version, but I think that is a good start for the module. The module has been developed as part of Sonar (maven module), with modifications in sonar-web for access to PDF reports, but it can be compiled/tested separately and I have isolated the module to try out of Sonar. For now, I have only one test, this test generates a PDF report of Sonar project (accesing to nemo.sonar.codehaus.org). You can execute the test with: "mvn test". There are still many things to do, I am working on this. Your comments will be welcome! Antonio.
Hide
Antonio Manuel Muñiz Martín added a comment -

Sonar PDF module attached.

Show
Antonio Manuel Muñiz Martín added a comment - Sonar PDF module attached.
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello.

Only for info, I am now working to include a table of contents, number pages, a title page and metrics tendency information.

Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hello. Only for info, I am now working to include a table of contents, number pages, a title page and metrics tendency information. Antonio.
Hide
Freddy Mallet added a comment -

Hi Antonio,

Thanks for this good job !
We are currently setting up the sonar-plugins project in order to host all Sonar plugins. I'll give you rights to publish your code during next week.

Freddy

Show
Freddy Mallet added a comment - Hi Antonio, Thanks for this good job ! We are currently setting up the sonar-plugins project in order to host all Sonar plugins. I'll give you rights to publish your code during next week. Freddy
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello.

I remember seeing a collection of sonar logos, do you know where they are? I thought they were on the wiki, but now I don´t find it.
I need a big logo for pdf front page.

Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hello. I remember seeing a collection of sonar logos, do you know where they are? I thought they were on the wiki, but now I don´t find it. I need a big logo for pdf front page. Antonio.
Hide
Simon Brandhof added a comment -

Hi Antonio, you can find some logos here.

Show
Simon Brandhof added a comment - Hi Antonio, you can find some logos here.
Hide
Freddy Mallet added a comment -

Hi Antonio, I've taken time to discuss about this valuable "PDF Report" feature with several Sonar users. The conclusion is that we can't answer to all needs in one report and needs depend on the role of each stakeholder. In a first time, we can simply start with two families of stakeholders :

  • Managers who need to know what is a weather like
  • All other stakeholders who want to get detailed information on a given project

What follows is just a suggestion, but it could be a good idea to produce those two reports :

  • "Sonar Executive Report" which displays all projects in table and highlightes projects in trouble (alerts)
  • "Sonar Team Workbook" which can be composed of the following sections :
    • Report Overview equivalent to Sonar's Dashboard but without treemap, radar, events, etc ...
    • Violations Summary to get the list of all violations by rules
    • Result Outline to get a complete list of files which have a violation on a given rule

Freddy

Show
Freddy Mallet added a comment - Hi Antonio, I've taken time to discuss about this valuable "PDF Report" feature with several Sonar users. The conclusion is that we can't answer to all needs in one report and needs depend on the role of each stakeholder. In a first time, we can simply start with two families of stakeholders :
  • Managers who need to know what is a weather like
  • All other stakeholders who want to get detailed information on a given project
What follows is just a suggestion, but it could be a good idea to produce those two reports :
  • "Sonar Executive Report" which displays all projects in table and highlightes projects in trouble (alerts)
  • "Sonar Team Workbook" which can be composed of the following sections :
    • Report Overview equivalent to Sonar's Dashboard but without treemap, radar, events, etc ...
    • Violations Summary to get the list of all violations by rules
    • Result Outline to get a complete list of files which have a violation on a given rule
Freddy
Hide
Antonio Manuel Muñiz Martín added a comment -

Hi Freddy,

Great!, I was thinking something like this.
Thanks for the images, very useful. I'm starting to work in this way.

I have done the first commit, really this isn't a plugin yet, because is not "installable" in Sonar, when we decide that is prepared I have to adapt some things. But now isn't the moment for this.

Thanks for all Freddy.
Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hi Freddy, Great!, I was thinking something like this. Thanks for the images, very useful. I'm starting to work in this way. I have done the first commit, really this isn't a plugin yet, because is not "installable" in Sonar, when we decide that is prepared I have to adapt some things. But now isn't the moment for this. Thanks for all Freddy. Antonio.
Hide
Antonio Manuel Muñiz Martín added a comment -

Hello,

I have seen that the Web Service API has been completely refactored.
PDF Plugin depends on the web service interface and changes on it have a medium impact in the plugin code.

For now a have developed with Sonar 1.6, I will do some changes to adapt the reporter to Sonar 1.7RC3
Do you preview more important changes in Web Services interface?

Thanks.
Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Hello, I have seen that the Web Service API has been completely refactored. PDF Plugin depends on the web service interface and changes on it have a medium impact in the plugin code. For now a have developed with Sonar 1.6, I will do some changes to adapt the reporter to Sonar 1.7RC3 Do you preview more important changes in Web Services interface? Thanks. Antonio.
Hide
Freddy Mallet added a comment -

Hi Folks, everyone interested by discussions about Sonar API and web services can switch to the Sonar mailing list. We're going to improve our communication about evolutions of this API.

Sorry Antonio for this lack of information.

Show
Freddy Mallet added a comment - Hi Folks, everyone interested by discussions about Sonar API and web services can switch to the Sonar mailing list. We're going to improve our communication about evolutions of this API. Sorry Antonio for this lack of information.
Hide
Antonio Manuel Muñiz Martín added a comment -

The first version of the plugin is ready for release. It will soon be uploaded to public Maven repository.
I close this ticket.

Show
Antonio Manuel Muñiz Martín added a comment - The first version of the plugin is ready for release. It will soon be uploaded to public Maven repository. I close this ticket.

People

Vote (8)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: