Advanced Search - Customize exported fields?

I have searched the forum a bit, but have not really found the information I am looking for. Every week, my supervisor needs a detailed report on the events that happened the week prior. I like the export feature, but there are some additional fields I would like to be added during the export to .csv. Ive poked around in the database, and browsed through the code a little bit, but cant seem to find where this gets called.

Any insight will be great!

Comments

I have searched the forum a bit, but have not really found the information I am looking for. Every week, my supervisor needs a detailed report on the events that happened the week prior. I like the export feature, but there are some additional fields I would like to be added during the export to .csv. Ive poked around in the database, and browsed through the code a little bit, but cant seem to find where this gets called.

Any insight will be great!

What fields you are trying to search?

Look at scp/tickets.inc.php that's where the table is defined with all fields, you can add more fields in table and when you export, they will show on your report.

No, i couldn't resolve this problem . But I had Created new export option which picks the tickets directly from data base by running the query. This is alternate of above but i am trying to resolve above also.

No, i couldn't resolve this problem . But I had Created new export option which picks the tickets directly from data base by running the query. This is alternate of above but i am trying to resolve above also.

Will someone help me with adding the threads in the export to csv.I found the file /include/class.export.php with the next fields.Can I add threads here also?Tried some things but did not succeed.File: # XXX: Think about facilitated exporting. For instance, we might have a # TicketExporter, which will know how to formulate or lookup a # format query (SQL), and cooperate with the output process to add # extra (recursive) information. In this funciton, the top-level # SQL is exported, but for something like tickets, we will need to # export attached messages, reponses, and notes, as well as # attachments associated with each, ... /* static */ function dumpTickets($sql, $how='csv') { return self::dumpQuery($sql, array( 'ticketID' => __('Ticket Id'), 'created' => __('Date'), 'subject' => __('Subject'), 'name' => __('From'), 'priority_desc' => __('Priority'), 'dept_name' => __('Department'), 'helptopic' => __('Help Topic'), 'source' => __('Source'), 'status' => __('Current Status') ),

Will someone help me with adding the threads in the export to csv.I found the file /include/class.export.php with the next fields.Can I add threads here also?Tried some things but did not succeed.File: # XXX: Think about facilitated exporting. For instance, we might have a # TicketExporter, which will know how to formulate or lookup a # format query (SQL), and cooperate with the output process to add # extra (recursive) information. In this funciton, the top-level # SQL is exported, but for something like tickets, we will need to # export attached messages, reponses, and notes, as well as # attachments associated with each, ... /* static */ function dumpTickets($sql, $how='csv') { return self::dumpQuery($sql, array( 'ticketID' => __('Ticket Id'), 'created' => __('Date'), 'subject' => __('Subject'), 'name' => __('From'), 'priority_desc' => __('Priority'), 'dept_name' => __('Department'), 'helptopic' => __('Help Topic'), 'source' => __('Source'), 'status' => __('Current Status') ),

Hello, I also modify the file you mention but not get succeed, what I did was something different, I could create a BAT file in order to export all fields of the table "ost_ticket", put the code and also enclose the file so that you can view and modify to your liking, if you have any questions you comment me.

cd C:\xampp\mysql\bin "here has to be the path where is hosted the osticket"ECHO.mysql -h localhost -u root -p -D osticket (-D osticket this is the name of my DATABASE) -e "SELECT * FROM `ost_ticket` WHERE year(`created`)=%ANO2% and month(`created`)=%MES2% and day(`created`)=%DIA2% INTO OUTFILE 'C:/Users/Administrador/Desktop/REPORTES/reporte.csv' (put the path where you want to save the exported file) FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\r\n';"

cd C:\Users\Administrador\Desktop\REPORTES (put the path where you saved the exported file)ren reporte.csv reporte_%dia%-%mes%-%anio%_%hora%-%minuto%_%segundo%.csv

What this green are comments I posted for you to understand what needs to change.BAT file comments that are red are in Spanish because it is my native language, these comments all may see when running the BAT file and should not be deleted, I will be attentive to your comments.