Clarity

 View Only
Expand all | Collapse all

CA PPM Tuesday Tip: XOG Time Reporting Periods

  • 1.  CA PPM Tuesday Tip: XOG Time Reporting Periods

    Broadcom Employee
    Posted Dec 09, 2014 12:10 PM
      |   view attached

    In CA PPM v14.1, the administrator can create Timesheet, Time Reporting Periods using XML Open Gateway (XOG)

    This functionality is released in limited scope and this article will help to explain how to utilize this functionality .

     

    I am including a ZIP file that contains sample XOG Read file and XOG Write file for creating weekly time reporting periods (Sunday-Saturday). See Usage Notes below for more details.

     

    Minimum Security Rights needed :

    • Administration - Application Setup      

      Allows user to edit Clarity options and settings, including OBS, Time, Data Administration and General Settings. Includes the Administration - Navigate right.

    • Administration - XOG      

    Allows user to import and export information through the XML Open Gateway interface using an installed XOG client. User can download the XOG client if he or she also has the Administration - Navigate right.

     

    Sample XOG Write XML:

    This sample has all the required attributes for creating new or updating  existing Time Reporting Periods.  This is a good format as the 'start' attribute is positioned before the 'finish' attribute and naturally you won't make the mistake of mixing up the dates on these attributes.

     

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

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

       <TimePeriods>

            <TimePeriod start="2014-07-20T00:00:00" finish="2014-07-27T00:00:00" create="true" scale="weekly" openForTimeEntry="false" />

            <TimePeriod start="2014-07-27T00:00:00" finish="2014-08-03T00:00:00" create="true" scale="weekly" openForTimeEntry="false" />

            <TimePeriod start="2014-08-03T00:00:00" finish="2014-08-10T00:00:00" create="true" scale="weekly" openForTimeEntry="false" />

       </TimePeriods>

    </NikuDataBus>

     

     

    Usage Notes:

    If you create the time periods setting the 'openForTimeEntry' for false, you can later execute the XOG to update the attribute to true.

    Known Issue: When 'updating' records, the XOG output file does not provide the correct 'updated' record count, but the UI reflects the changes.

    Known Issue CLRT-76738: The XOG Read output file is generated with missing line breaks, so the formatting is odd.  If you use the output generated by the XOG Read sample file, the write action will hang because the output does not include the 'create' or 'scale' attributes.  It is recommend that you do not use the output generated by the XOG Read action at this time.

    Known Issue CLRT-76739: If you leave out both 'create' and 'scale' ; the XOG action hangs.

    Known Issue CLRT-76688: The application UI throws the error 'Dates entered are not in range.' if you mix up the 'start' and 'finish' dates. However, currently the XOG write action does not generate an error and the record is created with the mixed up dates.  So be sure to double check the data in the XOG write files for 'start' and 'finish' dates.

     

    Explanation of Attributes:

    'start' - required for both create and update actions. Format = yyyy-mm-ddT00:00:00

    'finish' - required for both create and update actions. Format = yyyy-mm-ddT00:00:00

    Finish Date uses the 'midnight rule' logic.

    When the record is created the date will show minus one day from the finish date entered in the XOG XML file.

    Therefore, you will see the 'finish' date is the same as the 'start' date for the next time reporting period. (See sample XOG write XML)

    'create' - required for 'create' and 'update' action with value equal to "true"

    'scale' - required for 'create' action only with value equal to one of the valid values listed below

    Note: If you leave out 'scale' for creating a new period ; the XOG action completes but does not add the record. Known Issue: No error message is generated in the Log file to indicate the record is not created.

    Valid 'scale' values:

      annually

      semi_annually

      monthly

      quarterly

      daily

      weekly

      bi_weekly

    'openForTimeEntry' - optional.  If it is omitted and you are creating new periods or updating existing periods, it uses the default value 'true' which sets the period to 'Open'.

    Attachment(s)



  • 2.  Re: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Dec 09, 2014 04:29 PM

    Thanks, you did produce it.



  • 3.  Re: CA PPM Tuesday Tip: XOG Time Reporting Periods

     
    Posted Dec 09, 2014 06:34 PM

    Thanks for sharing this tip with the community Kathryn!

    Kathryn Ellis wrote:

     

    In CA PPM v14.1, the administrator can create Timesheet, Time Reporting Periods using XML Open Gateway (XOG)

    This functionality is released in limited scope and this article will help to explain how to utilize this functionality .

     

    I am including a ZIP file that contains sample XOG Read file and XOG Write file for creating weekly time reporting periods (Sunday-Saturday). See Usage Notes below for more details.

     

    Minimum Security Rights needed :

    • Administration - Application Setup     

      Allows user to edit Clarity options and settings, including OBS, Time, Data Administration and General Settings. Includes the Administration - Navigate right.

    • Administration - XOG     

    Allows user to import and export information through the XML Open Gateway interface using an installed XOG client. User can download the XOG client if he or she also has the Administration - Navigate right.

     

    Sample XOG Write XML:

    This sample has all the required attributes for creating new or updating  existing Time Reporting Periods.  This is a good format as the 'start' attribute is positioned before the 'finish' attribute and naturally you won't make the mistake of mixing up the dates on these attributes.

     

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

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

       <TimePeriods>

            <TimePeriod start="2014-07-20T00:00:00" finish="2014-07-27T00:00:00" create="true" scale="weekly" openForTimeEntry="false" />

            <TimePeriod start="2014-07-27T00:00:00" finish="2014-08-03T00:00:00" create="true" scale="weekly" openForTimeEntry="false" />

            <TimePeriod start="2014-08-03T00:00:00" finish="2014-08-10T00:00:00" create="true" scale="weekly" openForTimeEntry="false" />

       </TimePeriods>

    </NikuDataBus>

     

     

    Usage Notes:

    If you create the time periods setting the 'openForTimeEntry' for false, you can later execute the XOG to update the attribute to true.

    Known Issue: When 'updating' records, the XOG output file does not provide the correct 'updated' record count, but the UI reflects the changes.

    Known Issue CLRT-76738: The XOG Read output file is generated with missing line breaks, so the formatting is odd.  If you use the output generated by the XOG Read sample file, the write action will hang because the output does not include the 'create' or 'scale' attributes.  It is recommend that you do not use the output generated by the XOG Read action at this time.

    Known Issue CLRT-76739: If you leave out both 'create' and 'scale' ; the XOG action hangs.

    Known Issue CLRT-76688: The application UI throws the error 'Dates entered are not in range.' if you mix up the 'start' and 'finish' dates. However, currently the XOG write action does not generate an error and the record is created with the mixed up dates.  So be sure to double check the data in the XOG write files for 'start' and 'finish' dates.

     

    Explanation of Attributes:

    'start' - required for both create and update actions. Format = yyyy-mm-ddT00:00:00

    'finish' - required for both create and update actions. Format = yyyy-mm-ddT00:00:00

    Finish Date uses the 'midnight rule' logic.

    When the record is created the date will show minus one day from the finish date entered in the XOG XML file.

    Therefore, you will see the 'finish' date is the same as the 'start' date for the next time reporting period. (See sample XOG write XML)

    'create' - required for 'create' and 'update' action with value equal to "true"

    'scale' - required for 'create' action only with value equal to one of the valid values listed below

    Note: If you leave out 'scale' for creating a new period ; the XOG action completes but does not add the record. Known Issue: No error message is generated in the Log file to indicate the record is not created.

    Valid 'scale' values:

      annually

      semi_annually

      monthly

      quarterly

      daily

      weekly

      bi_weekly

    'openForTimeEntry' - optional.  If it is omitted and you are creating new periods or updating existing periods, it uses the default value 'true' which sets the period to 'Open'.



  • 4.  Re: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Dec 09, 2014 08:54 PM

    Thanks for sharing this, Kathryn


    NJ



  • 5.  Re: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Dec 10, 2014 12:01 AM

    Tried this...works perfectly in v14.1

     

    This will be very useful...Thanks a lot Kathryn.

     

    Regards,

    Georgy



  • 6.  Re: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Dec 11, 2014 01:57 PM

    Thanks for sharing Kathryn!



  • 7.  Re: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Dec 15, 2016 09:40 AM

    Thank you so much for sharing Kathryn!



  • 8.  RE: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Feb 06, 2022 10:37 PM
    Hi Kathryn,
    i'm running 15.9.3.  i tried using your model for creating Time Reporting Periods and i'm getting this error

    [CA Clarity][Oracle JDBC Driver][Oracle]ORA-01861: literal does not match format string

    any thoughts now how to make this import work for 15.9.x?

    Thanks


  • 9.  RE: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Feb 07, 2022 03:10 AM

    Why don't you include your input file. 

    The error suggest that there is something in it Oracle does not like. In many cases that is is the date format, but it can be other things as well.




  • 10.  RE: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Feb 07, 2022 04:45 AM
    I've seen this in other XOG contexts. The fix then was to set the Oracle date settings correctly:

    *.nls_date_format='YYYY-MM-DD HH24:MI:SS'
    *.nls_language='AMERICAN'
    *.nls_sort='BINARY'
    *.nls_territory='AMERICA'

    Just something to check.


  • 11.  RE: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Feb 07, 2022 11:44 AM
    Is that not so that if that is the problem you could test it by XOGing any data with a date eg project with start and finish dates?


  • 12.  RE: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Feb 07, 2022 05:30 PM
    the environment is On-Demand/SaaS.  i expect the Oracle settings are correct.


  • 13.  RE: CA PPM Tuesday Tip: XOG Time Reporting Periods

    Posted Feb 07, 2022 05:30 PM
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_timeperiod.xsd">
    <Header action="write" externalSource="NIKU" objectType="timeperiod" version="14.1"/>
    <TimePeriods>

    <TimePeriod start="2022-01-03T00:00:00" finish="2022-01-10T00:00:00" create="true" scale="weekly" openForTimeEntry="true" />
    <TimePeriod start="2022-01-10T00:00:00" finish="2022-01-17T00:00:00" create="true" scale="weekly" openForTimeEntry="true" />
    <TimePeriod start="2022-01-17T00:00:00" finish="2022-01-24T00:00:00" create="true" scale="weekly" openForTimeEntry="true" />

    </TimePeriods>
    </NikuDataBus>