AnsweredAssumed Answered

How to remove only future allocations on team tab, not the historical allocations

Question asked by sravani_nidamanuri on Dec 2, 2015
Latest reply on Jan 12, 2016 by paul.maxwell

Hi All,

 

We have a custom process which removes allocations on team tab after closure of project.

But we need only future allocations to be removed not the historical allocations.

 

We have different steps in the process, one among them is UPDATE PROJECT TEAM DATA and below is the code used by the step.

I'm unable to figure out which update statement is causing the allocations on the team tab to be wiped out.

Is it because of updating the slice status in PRTEAM table to 1 or some other updates? The process has other steps which updates the assignments and tasks.

If so I want only future allocations to be wiped out not the historical allocations.

 

Can any one please suggest me how to modify the code as per my requirement.

Is any one using similar kind of process to remove allocations on team tab. It would be help if they can help me with code.

 

 

<gel:script xmlns:core="jelly:core" xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary" xmlns:sql="jelly:sql"

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

  <gel:setDataSource dbId="niku"/>

  <!-- SET FUTURE HARD ALLOCATION START DATES TO TODAY -->

  <sql:update escapeText="0"

      var="results">

    UPDATE prteam SET hard_start = sysdate, hard_slice_status = 1

    WHERE prprojectid = ?

    AND hard_start &gt; sysdate

    <sql:param value="${gel_objectInstanceId}"/>

  </sql:update>

  <!-- SET FUTURE HARD ALLOCATION FINISH DATES TO TODAY -->

  <sql:update escapeText="0"

      var="results">

    UPDATE prteam SET hard_finish = sysdate, hard_slice_status = 1

    WHERE prprojectid = ?

    AND hard_finish &gt; sysdate

    <sql:param value="${gel_objectInstanceId}"/>

  </sql:update>

  <!-- SET FUTURE ALLOCATION START DATES TO TODAY -->

  <sql:update escapeText="0"

      var="results">

    UPDATE prteam SET pravailstart = sysdate, slice_status = 1

    WHERE prprojectid = ?

    AND pravailstart &gt; sysdate

    <sql:param value="${gel_objectInstanceId}"/>

  </sql:update>

  <!-- SET FUTURE HARD ALLOCATION FINISH DATES TO TODAY -->

  <sql:update escapeText="0"

      var="results">

    UPDATE prteam SET pravailfinish = sysdate, slice_status = 1

    WHERE prprojectid = ?

    AND pravailfinish &gt; sysdate

    <sql:param value="${gel_objectInstanceId}"/>

  </sql:update>

  <!-- CLOSE TEAM MEMBERS FOR TIME ENTRY -->

  <sql:update escapeText="0" var="results">

    UPDATE prteam SET prisopen = 0 WHERE prprojectid = ?

    <sql:param value="${gel_objectInstanceId}"/>

  </sql:update>

</gel:script>

 

Screen shot of team tab on project.

 

 

 

Thanks

Sravani

Outcomes