Topic
  • 3 replies
  • Latest Post - ‏2013-02-13T20:29:00Z by SystemAdmin
pCarsten
pCarsten
2 Posts

Pinned topic Search/report transition log

‏2010-05-14T10:17:54Z |
I'd like to create a report which queries the transition log. However, I can't seem to find a way to include it in either the query or the display results.

Any hints appreciated.
Updated on 2013-02-13T20:29:00Z at 2013-02-13T20:29:00Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    111 Posts

    Re: Search/report transition log

    ‏2010-05-14T21:08:57Z  
    I have a script that searches through the transition logs of forms looking for "revised_due_date". We wanted to see how many times the revised due date was changed. This is run on Windows as a batch file. Here is a snippet of code after my initial query for forms:

    ccm query -n problem%1
    ccm attr -s transition_log @ | find "revised_due_date" > tran_log.txt

    for %%S in (tran_log.txt) do (Set size=%%~zS)
    if %size% EQU [0] goto :EOF
    echo. >> %RPT_TXT%
    echo Informal AI %1: >> %RPT_TXT%
    echo. >> %RPT_TXT%
    type tran_log.txt >> %RPT_TXT%
    goto :EOF
    ----end----

    If anything is written to the tran_log.txt file, then it is appended to another file. This loops through all of the CRs returned from my original query. You could prompt for the search string.

    HTH,
    Steve
  • pCarsten
    pCarsten
    2 Posts

    Re: Search/report transition log

    ‏2010-05-25T09:32:27Z  
    I have a script that searches through the transition logs of forms looking for "revised_due_date". We wanted to see how many times the revised due date was changed. This is run on Windows as a batch file. Here is a snippet of code after my initial query for forms:

    ccm query -n problem%1
    ccm attr -s transition_log @ | find "revised_due_date" > tran_log.txt

    for %%S in (tran_log.txt) do (Set size=%%~zS)
    if %size% EQU [0] goto :EOF
    echo. >> %RPT_TXT%
    echo Informal AI %1: >> %RPT_TXT%
    echo. >> %RPT_TXT%
    type tran_log.txt >> %RPT_TXT%
    goto :EOF
    ----end----

    If anything is written to the tran_log.txt file, then it is appended to another file. This loops through all of the CRs returned from my original query. You could prompt for the search string.

    HTH,
    Steve
    Thanks Steve, that does help - I've already put some of that to good use.

    But I'm not sure I understand how I go about including the result in a report that is being initiated in Change? Is there an attribute type I can define to run the script while generating reports?

    / Carsten
  • SystemAdmin
    SystemAdmin
    111 Posts

    Re: Search/report transition log

    ‏2013-02-13T20:29:00Z  
    • pCarsten
    • ‏2010-05-25T09:32:27Z
    Thanks Steve, that does help - I've already put some of that to good use.

    But I'm not sure I understand how I go about including the result in a report that is being initiated in Change? Is there an attribute type I can define to run the script while generating reports?

    / Carsten
    Hello,

    how would one parse the transition log the print a csv file in the following format?

    record ID, entered, 2012/03/06 16:51:18, assigned, 2012/05/31 13:12:15, resolved, 2012/05/31 13:23:12, obsolete, 2013/02/13 10:56:52

    Submitted to entered by Ahmed Tawfik (ahmed.tawfik) on 2012/03/06 16:51:18

    Transitioned to assigned by Constance Walker (constance.walker) on 2012/05/31 13:12:15
    <comments not supplied>


    resolver: --> ricky.parks
    project_manager: --> constance.walker
    criticality: --> 3 - Major (Unexpected Result)

    Transitioned to resolved by Ricky Parks (ricky.parks) on 2012/05/31 13:23:12
    <comments not supplied>


    software_rev: --> A
    root_cause: (text value has changed)
    Reportable_10CFR21: --> Not Reportable
    resolution: (text value has changed)
    retest: --> No

    Transitioned to obsolete by _change_admin on 2013/02/13 10:56:52