AnsweredAssumed Answered

Update task start and finish with XOG

Question asked by adigoldman on Jul 21, 2015

 

I have the following section in my script:

 

 

 

                                                    <!-- RESET THE PROJECT XML -->

 

                                                    <gel:parse var="projxml">

 

                                                             <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.3.0.286">

 

                                                                      <args name="overrideAutoNumbering" value="false"/>

 

                                                               </Header>

 

                                                               <Projects>

 

                                                                      <Project name="${sql_input.rows[0].NAME}" projectID="${sql_input.rows[0].CODE}">

 

                                                                               <Tasks>

 

                                                                               </Tasks>

 

                                                                      </Project>

 

                                                               </Projects>

 

                                                             </NikuDataBus>

 

                                                    </gel:parse>

 

                                                   

 

                                                    <!--For each task (record in sql_input), change the start date and date-->

 

                                                    <core:forEach items="${sql_input.rows}" var="task2shift">

 

                                                    <!-- HANDLE THE CURRENT TASK THAT NEEDS TO BE OPEN UNDER THE CURRENT PROJECT -->

 

                                                             <gel:parse var="taskxml">

 

                                                                      <Task start="${sql_input.SHIFTED_START}" finish="${sql_input.SHIFTED_FINISH}" internalTaskID="${sql_input.PRID}">

 

                                                                      </Task>

 

                                                             </gel:parse>

 

                                                            

 

                                                             <gel:set value="${taskxml}" select="$projxml/NikuDataBus/Projects/Project/Tasks" insert="true"/>

 

                                                    </core:forEach>

 

 

 

                                                    <gel:log level="INFO">

 

                                                             <gel:expr select="$projxml"/>

 

                                                    </gel:log>       

 

 

 

When running the script, I see that the result project xml, which should have 4 tasks with ID, start snd finsh, has 3 blank task tags:

 

 

 

<?xml version="1.0" encoding="UTF-8"?>

 

<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.3.0.286">

 

                 <args name="overrideAutoNumbering" value="false"/>

 

         </Header>

 

         <Projects>

 

                 <Project name="????? ?????? ???? ????????? ?????" projectID="PR00000232">

 

                          <Tasks>

 

                                   <Task/>

 

                                   <Task/>

 

                                   <Task/>

 

                                   <Task/>

 

                          </Tasks>

 

                 </Project>

 

         </Projects>

 

</NikuDataBus>

 

 

 

Need to understand why the tasks asre blank

 

Thanks

 

Outcomes