Clarity

 View Only
  • 1.  Post timesheet job (run immediately)

    Posted Feb 21, 2017 01:36 PM

    When I execute the job timesheet (postTimesheets.xql)  using the parameter when=immediately, approved timesheets doesn't move to posted.

     

    post timesheet job

    However, if I execute the job again, those approved timesheets will be posted.

     

     

    In the same way, it works fine when i select  "Scheduled" and "Immediately" for parameter "When", so its requiring a 2nd execution of the job....

     

    immediately and scheduled

     

    Also I tried without success to configure the logs to see what is happening. 

    I enabled:

    • Enables or disables action tracing (SQL Trace)
    • Trace jobs

    and All in Categories

     

    How can i have more information about what the jobs is doing?

    Thanks



  • 2.  Re: Post timesheet job (run immediately)
    Best Answer

    Broadcom Employee
    Posted Feb 21, 2017 03:21 PM

    Hi Daniel

     

     

    What you are seeing is due to the design of Post Timesheets job - the job will not post any timesheets that have been Approved less than 5 minutes ago.

     

    The 5 minutes delay is hard coded and it's specifically for the purpose of allowing the user/PM to change their mind before the data gets Posted.

     

    So the reason you see this is not the Immediate run - if you had more timesheets, and some were approved earlier you would see those would be Posted as opposed to the ones that just were updated.

     

    I hope this helps -Nika



  • 3.  Re: Post timesheet job (run immediately)

    Posted Feb 22, 2017 03:39 AM

    Thanks Nika,

     

    Your feedback is precious because I could find nothing about this restriction.

    In any event, it would be useful to be able to trace or see a list of changes done by this job. Is it possible?



  • 4.  Re: Post timesheet job (run immediately)

    Broadcom Employee
    Posted Feb 22, 2017 09:38 AM

    Hi Daniel,

     

    You should be able to trace the job by enabling SQL trace on it in CSA - Server - Logs - Edit Configuration (Enable the Trace Jobs flag and the user who actually runs the job should be enabled for SQL trace). For more information on enabling the user click here:

    https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec573491.html

    Please note this should be done only for the trace and should not be left on indefinitely. The tracing should be used for a purpose, for example to work on an issue.

     

    Hope this helps -Nika



  • 5.  Re: Post timesheet job (run immediately)

    Posted Feb 22, 2017 09:41 AM

    Just for info, the piece of code that controls the notorious '5 minute delay' appears to be;

    <!-- <niku:variable name="postTime" value="{$now}"/> for dev purpose only (if we are just as inpatient!) -->
    <niku:variable name="postTime" value="{addtime($now, 'm', -5)}"/>

    at the top of the 'postTimesheets.xql' file in ..\webroot\WEB-INF\projmgr\xql

     

    Obviously changing that file would be an unsupported customisation, but it should be pretty clear what to do.