Posted Fri, 28 Aug 2015 13:22:29 GMT by Portal Admin

Currently (as of 3.8 and eariler) the Job history report uses an 'OR' if you select multiple sections, so this tag or this status.  

 

an sql statement that could run and/or modify is below:

SELECT k.*, m.job_name as job_suite_name FROM (

                SELECT

                                jh.id,

                                jh.job_name,

                                jh.job_status,

                                jh.server_initiated_time_utc,

                                jh.agent_name,

                                jh.agent_group_name,

                                jh.scheduled_time_utc,

                                jh.server_running_time_utc,

                                jh.server_ended_time_utc,

                                jh.server_submitted_time_utc,

                                jh.was_missed,

                                jh.ended_reason_code,

                                jh.initiation_code,

                                j.job_type,

                                jh.job_suite_history_id

                FROM   job_histories jh join jobs j on jh.job_id = j.id

                                                left outer join taggings ting on ting.taggable_id=jh.job_id and (ting.taggable_type='Job' or ting.taggable_type='JobSuite')

                                                left outer join tags t on t.id=ting.tag_id

                where   jh.job_id = j.id  AND

                                                (  server_ended_time_utc>= 1401116820000 AND  server_ended_time_utc <= 401203220000 OR  server_initiated_time_utc >= 1401116820000 AND  server_initiated_time_utc <= 401203220000 ) AND

                                                (  (  t.name='keith' )  or  (  jh.job_status='A' or  jh.job_status='C' or  h.job_status='F' or  jh.job_status='R' )  ) and jh.job_status<>'M'

                ORDER BY jh.id DESC )

as k   LEFT JOIN job_histories as m on  k.job_suite_history_id = m.id

 

If just need the results and not a report, can get the info direct from the histroy screen also using filters.

Posted Wed, 07 Nov 2018 20:49:51 GMT by Craig Danforth

I don't know if this is the proper location to ask a question but I am going to try.  Is there away to create the reports in csv versus a pdf?  I want to use a tag on certain jobs of interest and the output be a .csv file as input to an automation script that I am writing?

You must be signed in to post in this forum.