Clarity

  • 1.  Bulk Update of Staff Obs Unit in Project's Team

    Posted Jun 12, 2014 08:21 AM

    I have to update the value of field rsf_obsunit_id (Table - Prteam). For that i tried to update through gel using xog, but not get success, So tried to update through sql update, which is working fine.(below is the code)

    Could anyone suggest me if it is ok to update through sql update or it may create some ambiguity in the data

     

     

    <sql:update var="cur_inst">

    Update prteam prt

    Set prt.rsf_obsunit_id = NVL((select Obs_unit_id from nbi_dim_obs
    where obs_type_id = 5000025
    AND path = (select path from nbi_dim_obs where Obs_unit_id = prt.rsf_obsunit_id)),prt.rsf_obsunit_id)

    where prt.prresourceid in (select prj.prid from PRTEAM prt1, PRJ_RESOURCES prj where prt1.prresourceid = prj.prid AND prj.prisrole = 1 AND prt1.prid = prt.prid)
    AND prt.prprojectid = 5012602
     </sql:update>

     

    Kindly help



  • 2.  RE: Bulk Update of Staff Obs Unit in Project's Team

    Posted Jun 12, 2014 12:42 PM

    Direct db update - an BIG NO devil

    Do it via xog. What is the issue with xog ?

    NJ



  • 3.  RE: Bulk Update of Staff Obs Unit in Project's Team

    Posted Jun 13, 2014 02:16 AM
    navzjoshi00:

    Direct db update - an BIG NO devil

    Do it via xog. What is the issue with xog ?

    NJ


    Thanks for the reply.

    I have created the xog which is working fine with hardcoded values. Problem is how and from which table to retrive the values for updating the xog. please find below the xog:

    From which table i can find below fields, I found those on Prteam but needs some help as "defaultAllocation" is stored on curve and not found availFrom="" and availTo=""

    availFrom="" availTo=""
    defaultAllocation="0"

     

     <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
                                <Header action="write" externalSource="NIKU" objectType="project" version="13.1.0.0248"/>
                                <Projects>
                                  <Project entityCode="xx" name="Test OBS" projectID="PR7604">
            
      <Resources>
      <Resource
          availFrom="" availTo="" 
       bookingStatus="5" capitalPercentage="1" defaultAllocation="0"
          isProjectManager="false"
       lastUpdatedBy="xxxxx" lastUpdatedDate="2014-06-10T13:01:32"
       openForTimeEntry="true"
      
          projectRoleID="z_bldn_sup" resourceID="z_bldn_sup" staffOBSType="xxxxx" staffOBSUnit="xxxx" teamId="z_bldn_sup">
       <!-- <CustomInformation><ColumnValue name="partition_code">z_psd</ColumnValue></CustomInformation> -->
      </Resource>
      </Resources>
                                </Project>
                                </Projects>
     </NikuDataBus>

     



  • 4.  RE: Bulk Update of Staff Obs Unit in Project's Team

    Posted Jun 13, 2014 04:01 AM
    abhashk:
    Problem is how and from which table to retrive the values for updating the xog. please find below the xog:

    From which table i can find below fields, I found those on Prteam but needs some help as "defaultAllocation" is stored on curve and not found availFrom="" and availTo=""

    availFrom="" availTo=""
    defaultAllocation="0"

     


    I'm pretty sure (but I have not double-checked) that you don't need to provide those values in the XML (there is definately only certain attributes that are mandatory in the XML and I think for the <Resource> tag in projects it might only be the resourceID).

    (availFrom/To are the PRTEAM.PRAVAILSTART/PRAVAILFINISH, default allocation is not on the database as a simple field though)
     



  • 5.  Re: Bulk Update of Staff Obs Unit in Project's Team

    Posted Jun 18, 2014 04:06 AM

    Also BULK updates to OBS values can generally be done from the administration end - go to the OBS settings in the administration menu, find the OBS, look at its 'units', find the unit you are interested in, go to the 'attached instances' - you then should be able to "select" all the things that you want to be associated to that unit and attach them.

     

    (never tried this with 'team' records though)



  • 6.  Re: Bulk Update of Staff Obs Unit in Project's Team

    Posted Sep 02, 2016 12:46 AM

    Unfortunately, there is no Team object there  



  • 7.  Re: Bulk Update of Staff Obs Unit in Project's Team

    Posted Jul 20, 2016 12:44 AM

    I raised a question today, where I had to XOG out the Project/Team/Allocations, modify the required attributes, and XOG back in again.

     

    More details here - Updating Team data using custom process

     

    By using XOG, you don't need database tables etc.  This is working for me, with the exception of staffOBSUnit, which unfortuantly is the attribute you are also attempting to update.

     

    Note, if you do not undertaken this approach, you will 'destroy' the allocations - see http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec1055215.aspx

     

    I do have a working GEL Script that does update the staffOBSUnit, but it will wipe out your allocations, as I undertook similar approach to the earlier provided XOG, until I hit the 'destroy the allocations' challenge.