Clarity

  • 1.  How to bulk return timesheets

    Posted Oct 05, 2017 11:42 AM

    We are developing a process that contains a pre-validation check, whereby we want to bulk return all approved timesheets that fail the pre-validation check to prevent their inclusion when we run the Post Timesheets job.  I've done quite a bit of poking around on this, and found that I'd need to use the time period REST API to accomplish this... only to review the REST API documentation and find a glaring notice that they for use by CA PPM Engineering only: https://docops.ca.com/ca-ppm/14-4/en/reference/rest-apis.

     

    So my question is, has anyone else accomplished programmatically returning timesheets via a CA approved/sanctioned method?

     

    Thanks!



  • 2.  Re: How to bulk return timesheets

    Posted Oct 06, 2017 10:32 AM

    Did you try using a process with GEL calling the timesheets XOG approval using approved='false' ?

     

    example:

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/timesheetApproval.xsd">
    <Header action="write" externalSource="NIKU" objectType="timesheetApproval" version="13.3.0.286"/>
    <timesheetApprovals>
    <timesheetApproval approved="false" timesheetDbId="..." resourceDbId="..." timeperiodDbId="..."/>
    </timesheetApprovals>
    </NikuDataBus>

     

    Anthony



  • 3.  Re: How to bulk return timesheets

    Posted Oct 06, 2017 06:00 PM

    Hi Anthony!

     

    I did not know it existed because we don't have XOG read/write samples for that in the xml directory that was created when we installed the XOG client.  Do you know where I can get my hands on the sample files?

     

    I did try your example above, and received the following error when performing the XOG using the admin user:

     

    <XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd"> <Object type="timesheetApproval"/> <Status elapsedTime="0.026 seconds" state="SUCCESS"/> <Statistics failureRecords="1" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="0"/> <Records> <Record> <KeyInformation> <column name="externalSource">NIKU</column> <column name="Timesheet Id">5021204</column> </KeyInformation> <ErrorInformation> <Severity>FATAL</Severity> <Description>TMA-0101: One or more timesheets not returned. You can only return submitted and approved timesheets for resources you have approve rights over.</Description> </ErrorInformation> </Record> </Records>< /XOGOutput>

     

    The admin user has the following permissions related to timesheet/resource approvals:

     

    Timesheet approval - XOG Access

    Timesheets - Approve All

    Resource - Approve Time (with rights to all resource roles)

     

    Are there any other permissions necessary, or do you have any insight into this error?

     

    Thanks!



  • 4.  Re: How to bulk return timesheets
    Best Answer

    Posted Oct 08, 2017 05:54 AM

    Hi Tanessa? (is that your first name?)

     

    Yes, this is a perfect example of some of the wonderful, not very well documented, things that CA PPM has to offer

     

    Yes, you need of course timesheet approval permissions to launch this XOG. But if what you state here is true, then it seems you do have it. I used that XOG in a process to auto-approve submitted timesheets and it worked like a charm. But i have no access to their platform today to check the permissions.

     

    What I would do is the following:

    >> add all the timesheet rights to your user (also Navigate / Edit All)

    >> test this xog on a specific timesheet of a resource by not using the admin user, but the resource manager

     

    Let me know if that helps,

     

    Anthony



  • 5.  Re: How to bulk return timesheets

    Posted Oct 11, 2017 07:28 AM

    Hi Anthony!

     

    Yes, Tanessa is my first name.

     

    We have ensured the additional permissions you suggested were in place and have tried several more tests, both as the admin user and the resource manager, and we get the same error message every time.  In case it matters, we are SaaS customers.

     

    Thanks!

    Tanessa



  • 6.  Re: How to bulk return timesheets

    Posted Oct 17, 2017 07:33 AM

    Both of Anthony's suggestions led to a successful result.  The final hurdle for me was thinking I had the timesheet db id correct, when I did not.  Once that was fixed, Anthony's suggestions worked like a charm.

     

    Thanks!