Clarity

Expand all | Collapse all

XOG in approved timesheet

  • 1.  XOG in approved timesheet

    Posted Dec 04, 2012 02:59 PM
    Has anyone been able to XOG in an approval to a submitted Timesheet?
    I can extract the timesheet via the readTimePeriod service without problems.
    Trying to update the timesheet with approval via writeTimePeriod returns...
    XOG-2014: Timesheet already submitted. Submitted timesheets can't be altered.
    or
    XOG-2015: This timesheet can not be saved because it has since been updated by another user. Save your changes in a new file, then retrieve the same timesheet again and re-enter your time.

    There is a TimeSheetApproval service. Using this...
    -I can't get the read for it to work.
    -There is no example in the XOG client
    -Trying to guess at the write syntax is failing.
    Attempted Read:
    <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Header version="12.1.1.1208" externalSource="NIKU"/>
    <Query>
    <Filter name="resourceID" criteria="EQUALS">MYOPRID</Filter>
    </Query>
    </NikuDataBus>
    Output:
    Invalid filter name, criteria or value: resourceID, EQUALS, MYOPRID
    and MYOPRID exists in the database and works to pull back timesheet with the readTimePeriod XOG service


  • 2.  RE: XOG in approved timesheet

    Posted Dec 06, 2012 04:54 AM
    Have you tried "prj_timeperiods_read.xml" ?

    <?xml version="1.0" encoding="UTF-8"?>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">

    <Header version="6.0.11" action="read" objectType="timeperiod" externalSource="NIKU"/>

    <Query>


    <!--

    <Filter name="start" criteria="BETWEEN">2002-01-01, 2002-01-15</Filter>


    <Filter name="resourceID" criteria="EQUALS">XOGProg1Res</Filter>


    <Filter name="status" criteria="EQUALS">4</Filter>


    <Filter name="modifiedDate" criteria="AFTER">2002-01-01T15:36:03</Filter>


    <Filter name="includeAdjusted" criteria="EQUALS">true</Filter>


    <Filter name="createTimesheet" criteria="EQUALS">true</Filter>

    -->


    <Filter name="start" criteria="BETWEEN">01-Jan-2012, 01-Dec-2012</Filter>


    <Filter name="resourceID" criteria="EQUALS">RESOURCEID</Filter>

    </Query>
    </NikuDataBus>

    NJ


  • 3.  RE: XOG in approved timesheet

    Posted Dec 06, 2012 05:10 AM

    navzjoshi00 wrote:

    Have you tried "prj_timeperiods_read.xml" ?

    byron.stephan wrote:

    I can extract the timesheet via the readTimePeriod service without problems....
    So that is clearly a "YES" he has. 8o

    --

    @Stephan - can you do the update OK if the timesheet is not "submitted", just "open"?

    (GUESSing a little here; it seems that there is some Clarity-logic that prevents any updates to submitted timesheets)


  • 4.  RE: XOG in approved timesheet

    Posted Dec 06, 2012 08:46 AM
    Yep, updates are fine until it is submitted. Once it is submitted I get the message...
    XOG-2014: Timesheet already submitted. Submitted timesheets can't be altered.


    I didn't try to set it as approved when it is still open. That isn't something I want to do either... <grin>
    I have tried from XOG client with the same results.

    There is a timesheetapproval xsd in the xog client but I haven't been able to get this to do anything and there is no example in the xog client using this schema. I created an XML file based on this schema and I can't get anything to read with it and the write doesn't work either. Although the write could be because I didn't have the correct database id. I'm not getting the DbId when extracting via the prj_timeperiods_read.xml or via the service.


  • 5.  RE: XOG in approved timesheet
    Best Answer

    Posted Dec 11, 2012 07:53 AM
    Hi,
    I have successfully approved submitted time sheets using the following XOG created from the timesheetapproval.xsd
    <?xml version="1.0" encoding="UTF-8"?>    
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_timesheetApproval.xsd">
        <Header action="write" externalSource="NIKU" objectType="timesheetApproval" version="12.1.0.5840"/>
        <timesheetApprovals>
            <timesheetApproval isAdjusted="false" isAdjustment="false" resourceDbId="the internal database resource id" resourceId="the resource id" resourceName="Last Name, First Name"
                 start="2012-09-03T00:00:00" status="3" timeperiodDbId="the internal database time period id" timesheetDbId="the internal database timesheet id" total="40" approved="true"/>
        </timesheetApprovals>
    </NikuDataBus>
    Regards
    Steve


  • 6.  RE: XOG in approved timesheet

    Posted Dec 11, 2012 02:21 PM
    I figured something like that.

    But how do i get the internal DB Id? Can I use the readtimesheetapproval to get it? Every try with various filters fail.

    Do I have to backtrack to use a Query to get the internal DB Id?

    And I assume the approval user id will be based on the login id of the user doing the XOG.


  • 7.  RE: XOG in approved timesheet

    Posted Dec 12, 2012 05:01 AM
    My guess is that the timesheetApproval object is a special case, which is why it doesn't appear in the documentation. Maybe it is used by the timesheet mobile app or something?
    From what I can see, the read does not accept any filter, and running the read without a filter will return the details of the timesheets requiring approval by the resource used to XOG, for the current timeperiod only.
    If this suits your requirements then you can use the read, otherwise you will need to query for the details needed for the write based on the Timesheet ID I suspect.
    And yes, the timesheet is approved by the XOG user.


  • 8.  RE: XOG in approved timesheet

    Posted Dec 12, 2012 08:57 AM
    Thank You!!!
    That is what I was missing. The ID I was logging in with had global rights but had no resources assigned.
    Once I removed all filters AND added resources reporting to the ID it worked!!!

    Can't thank you enough...
    Driving me crazy with what I knew had to be good filters and with data I knew existed.
    Really annoying how it said the filter, criteria , value was bad. When I gave a bad filter name it gave a normal error. When I put a valid filter then it complained "Invalid filter name, criteria or value: resourceID, EQUALS, XOGProg1Res". Apparently that was it's subtle way of trying to tell me NOT to use any filters.

    For those finding this in the future...
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
    <Header version="12.1.0.5840" externalSource="NIKU"/>
    <Query>
    </Query>
    </NikuDataBus>
    This allows the XOG service to work.and returns the Submitted timesheets for the current ID to approve.


  • 9.  RE: [Clarity XOG/GEL/WSDL] RE: XOG in approved timesheet

    Posted Dec 06, 2012 08:12 AM
    I did the read. That works fine. How do I do Approve the submitted timesheet?

    From: CA Clarity Global User Community [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Thursday, December 06, 2012 4:54 AM
    To: mb.10040449.99802003@myca-email.ca.com
    Subject: [Clarity XOG/GEL/WSDL] RE: XOG in approved timesheet

    Have you tried "prj_timeperiods_read.xml" ?

    <?xml version="1.0" encoding="UTF-8"?>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
    <Header version="6.0.11" action="read" objectType="timeperiod" externalSource="NIKU"/>
    <Query>
    <!--
    <Filter name="start" criteria="BETWEEN">2002-01-01, 2002-01-15</Filter>
    <Filter name="resourceID" criteria="EQUALS">XOGProg1Res</Filter>
    <Filter name="status" criteria="EQUALS">4</Filter>
    <Filter name="modifiedDate" criteria="AFTER">2002-01-01T15:36:03</Filter>
    <Filter name="includeAdjusted" criteria="EQUALS">true</Filter>
    <Filter name="createTimesheet" criteria="EQUALS">true</Filter>
    -->
    <Filter name="start" criteria="BETWEEN">01-Jan-2012, 01-Dec-2012</Filter>
    <Filter name="resourceID" criteria="EQUALS">RESOURCEID</Filter>
    </Query>
    </NikuDataBus>

    NJ
    Posted by:navzjoshi00
    --
    CA Communities Message Boards
    99804543
    mb.10040449.99802003@myca-email.ca.com<mailto:mb.10040449.99802003@myca-email.ca.com>
    https://communities.ca.com

    ________________________________

    This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of Highmark Inc., its subsidiaries, or affiliates.


  • 10.  RE: [Clarity XOG/GEL/WSDL] RE: XOG in approved timesheet

    Posted Dec 11, 2012 04:03 AM
    Check the below post -
    96375731

    Here's the solution from the above post -

    To create a timesheet where no timesheet exists in the time period - Put in “-1” in the timesheet id field. The action needs to be “add”. Version is 1. Status is “0”
    To update actuals in a timesheet - Put in the timesheet id into the timesheet id field. The action needs to be “replace”. Version and Status will be based on what is specified in the prtimesheet table.



    <?xml version="1.0" encoding="UTF-8"?>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_timeperiod.xsd">
    <Header version="6.0.11" action="write" objectType="timeperiod" externalSource="NIKU"/>
    <TimePeriods>
    <TimePeriod finish="2010-11-06T00:00:00" start="2010-10-31T00:00:00">
    <TimeSheets>
    <TimeSheet ID="<-1 to create a timesheet ... in case timesheet exists, put the timesheet id>" resourceID="resourceid" version="<1, to create timesheet ... for already existing, the value will be based on what is specified in the prtimesheet table>" action="<add, to create timesheet ... replace, to update>" status="<0, to create timesheet ... for already existing, the value will be based on what is specified in the prtimesheet table>">
    <TimeSheetEntries>
    <TimeSheetEntry projectID="<project code>" assignmentEstimate="0" assignmentPendingEstimate="0" assignmentID="<assignment id>" assignmentStart= "2010-10-24T00:00:00" chargeCodeID="<chargecode id>" assignmentFinish="2010-10-31T00:00:00" taskID="<task id>">
    <DailyActuals>
    <Actual actualDate="2010-10-24" amount="<amount>"/>
    <Actual actualDate="2010-10-31" amount="<amount>"/>
    <Actual actualDate="2010-11-01" amount="<amount>"/>
    <Actual actualDate="2010-11-02" amount="<amount>"/>
    <Actual actualDate="2010-11-03" amount="<amount>"/>
    <Actual actualDate="2010-11-04" amount="<amount>"/>
    <Actual actualDate="2010-11-05" amount="<amount>"/>
    </DailyActuals>
    </TimeSheetEntry>
    </TimeSheetEntries>
    <Notes>
    <NoteData noteText="<text for note>” createdBy="<resourceid>" createdTime="2010-11-05T16:52:18" category="<note category>"/>
    </Notes>
    </TimeSheet>
    </TimeSheets>
    </TimePeriod>
    </TimePeriods>
    </NikuDataBus>


    NJ


  • 11.  Re: XOG in approved timesheet

    Posted Mar 18, 2015 07:49 AM

    Hi ,

     

    Can we update submitted by field of timesheets via xog? when i tried submitting timesheet it is not taking xog user as submitted by.

    I have also used the xml below with submittedBy attribute but submittedby field is not updated with admin. Any help would be much appreciated

     

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_timeperiod.xsd">

                  <Header action="write" externalSource="NIKU" objectType="timeperiod" version="13.1.0.0248"/>

                  <TimePeriods>

                    <TimePeriod  finish="2015-01-05T00:00:00" start="2014-12-29T00:00:00" openForTimeEntry="true" >

                      <TimeSheets>

                        <TimeSheet ID="6788532"  resourceID="aa" status="1" version="2" submittedBy="1" >

                        </TimeSheet>

                       </TimeSheets>

                    </TimePeriod>

                   </TimePeriods>

    </NikuDataBus>

     

    Thank you