Re: Category becomes Category_id? (John Reese) (David Hicks)
Jon Hardcastle <[email protected]> Thu, 19 May 2011 09:06:03 +0100
| Newsgroups | gmane.comp.bug-tracking.mantis.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, Thanks for your help. I am probably being abit special here but we are tailoring the csv export using 'csv_columns' in the 'Database Configuration' section. How would I call category_get_name()? (abit) like this (this is an old one) array(id, custom_Client Name, reporter_id, handler_id, date_submitted, custom_Call Priority, category, reproducibility, status, last_updated, summary, resolution) -> complex etc etc Message: 2 Date: Tue, 17 May 2011 19:10:43 +1000 From: David Hicks <[email protected]> Subject: Re: [mantisbt-help] Category becomes Category_id? (John Reese) To: [email protected] Message-ID: <1305623454.16980.3.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]> Content-Type: text/plain; charset="utf-8" On Tue, 2011-05-17 at 09:09 +0100, Jon Hardcastle wrote: > We aren't generating reports in code. But we have tailored some of the > view screens and the csv export etc. > > How/what should one do for category in these cases? If I understand your question correctly, you're likely going to want to use the category_get_name() function from category_api. You may also want to use category_get_id_by_name() - although beware that this is prone to abuse... you *should* be using category IDs internally within your code instead of category names. The only time you should ever have to deal with category names is when you're doing something related to the user interface (showing category names), category management (checking duplicate names when adding categories) and perhaps importing and exporting as well. Regards, David ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ mantisbt-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mantisbt-help