From: Julian F. <ju...@be...> - 2002-12-19 20:23:20
|
Yes, you should try to base it off the existing code. Although, I don't think I've really thoroughly cleaned up those pages yet... if you look at some of the first files alphabetically, you'll see how much cleaner they are. We need to remove references to globals variables, use the gpc_api to get the form variables, etc, etc. Also, I added a filter_get_bug_rows() function a while ago. This function gets a filter for the current user (currently from a cookie but it could be changed to use the DB, or a session, or whatever) and returns the bugs that match the filter. This is already used by csv_export.php and view_all_bug_page.php but not by the print stuff. I think I'd actually like to rename these so they're all export_csv.php, export_word.php, export_xml.php or something... it's weird that they're called print_* if you ask me. Then maybe we could add a config option to allow you to define what export files should be provided?? Then people could add their own without having to patch the menu generating code... So the export pages should just have to use filter_get_bug_rows() to get the bugs and then output them however they want... the code should be pretty simple. We may want to change filter_get_bug_rows() so it returns bug objects instead of bug rows (we didn't have the objects when I wrote that function) but I'm not sure... Julian Dries Samyn wrote: > I've just downloaded and installed the 0.18 CVS version. > I see that at lot of work is done already on the reporting (print reports) > area. > I could add the CSV and XML to the already existing formats, and extend the > filtering, but I probably should be using the code that's already there to > start from. > Any ideas? > > dries. > > >>-----Original Message----- >>From: Julian Fitzell [mailto:ju...@be...] >>Sent: 17 December 2002 20:07 >>To: man...@li... >>Subject: Re: [Mantisbt-dev] New Reporting functionality >> >> >>Hi Dries, >> >>Attached are the changes I had to make to test it with the >>CVS version >>of mantis (so others can have a look easily). >> >>I think this is fundamentally a good thing. Though, as you >>say the code >>certainly isn't ready to go into CVS :) (note for your own code, you >>spelled 'reproducibility' wrong throughout which is giving me >>warnings >>all over the place). >> >>I think you should be able to extend the current CSV reporting to do >>what you want (was it just missing fields?). >> >>The XML export is a good idea. Should we come up with a DTD or xml >>schema for it so that it is documented properly? If you want >>to clean >>this up, make sure you do it against the CVS version of the >>code since >>it has changed a lot. Also, I think the reporting mechanism >>in general >>could be made cleaner and I haven't got to it yet. So if you >>feel like >>being a bit more ambitious and reworking that section then we could >>start a discussion here about what could be done to improve it. >> >>For starters, I'd like to have one chunk of code that does >>the filtering >>or whatever and returns the data (or at least a list of bug >>ids) to any >>of the pluggable filters. It would be nice if someone could >>just drop >>in their own custom export format. >> >>Let us know if you're interested in tackling any of this. >> >>Julian >> >>Dries Samyn wrote: >> >>>Hi all, >>> >>>I've added a more comprehensive reporting functionality for >> >>Mantis for the >> >>>work we do here. >>>It basically creates a complete report for a project >> >>(including bugnotes >> >>>etc) and exports it to either CSV or XML format (yeas, it >> >>can take a while >> >>>if you have a few hundred bugs in your project). >>>It was a quick hack (we needed it fast), so it's not >> >>completely mantis >> >>>compliant (i.e. I haven't used all the APIs properly), but >> >>I'm just posting >> >>>this so to see if there's interest. If there is, I can >> >>rework it quite >> >>>easily so to use the mantis DB API etc. >>>The SQL is very messy as well, as I said, it was a quick >> >>and dirty job, but >> >>>I'll happily fix it ;) >>> >>>In our case, I just added a navigation item "reporting" >> >>that would link to >> >>>my new custom_reporting.php. >>> >>>Feedback welcome ... >>> >>>Regards, >>> >>>dries/ >>> >>> >> >> >>-- >>ju...@be... >>Beta4 Productions (http://www.beta4.com) >> >> >> >>------------------------------------------------------- >>This sf.net email is sponsored by: >>With Great Power, Comes Great Responsibility >>Learn to use your power at OSDN's High Performance Computing Channel >>http://hpc.devchannel.org/ >>_______________________________________________ >>Mantisbt-dev mailing list >>Man...@li... >>https://lists.sourceforge.net/lists/listinfo/mantisbt-dev >> > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Geek Gift Procrastinating? > Get the perfect geek gift now! Before the Holidays pass you by. > T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ > _______________________________________________ > Mantisbt-dev mailing list > Man...@li... > https://lists.sourceforge.net/lists/listinfo/mantisbt-dev -- ju...@be... Beta4 Productions (http://www.beta4.com) |