<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions in 2014 - r6640</title>
<link>https://overflow.efficy.io/?qa=questions/developers/bug-fixes/major-bug-fixes/2014-r6640</link>
<description>Powered by Question2Answer</description>
<item>
<title>R6640 - Actions not displayed in the Agenda</title>
<link>https://overflow.efficy.io/?qa=888/r6640-actions-not-displayed-in-the-agenda</link>
<description>&lt;p&gt;Dear All,&lt;/p&gt;

&lt;p&gt;After an upgrade from R6100 to R6640, the actions are not displayed in the agenda.&lt;/p&gt;

&lt;p&gt;This is due to the fact that some data that were previously in the table ACTIONS need to be on the table ACTI_USER.&lt;/p&gt;

&lt;p&gt;To move this data from the table ACTIONS to ACTI_USER, you need to execute a query :&lt;/p&gt;

&lt;p&gt;For SQL SERVER (to execute in SQL Server Management Studio) :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;UPDATE au
SET 
    P_D_BEGIN = cast(a.D_BEGIN as int) + 1, 
    P_D_END =  cast(a.D_END as int) + 1, 
    ISAGENDA = (SELECT
    CASE 
        WHEN a.PLANNED = '1' AND au.ISACTIVE = '1' AND (au.STATUS IS NULL OR au.STATUS IN ('', '0', '2', '3', '5', '6')) 
        THEN '1' 
        ELSE '0' 
    END)
FROM
 [Admin].ACTI_USER au
LEFT JOIN 
 [Admin].ACTIONS a ON a.K_action = au.k_action;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For Oracle (to execute in SQL Developer):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DECLARE 

TYPE T_ROWID_ARRAY IS TABLE OF ROWID; 

CURSOR C_ACTI_USER IS 

SELECT ROWID 

FROM ACTI_USER 

WHERE P_D_BEGIN IS NULL; 

V_ROWID_ARRAY T_ROWID_ARRAY; 

V_LIMIT NUMBER := 1000; 

BEGIN 

OPEN C_ACTI_USER; 

LOOP 

FETCH C_ACTI_USER BULK COLLECT 

INTO V_ROWID_ARRAY 

LIMIT V_LIMIT; 

FORALL I IN 1 .. V_ROWID_ARRAY.COUNT 

UPDATE ACTI_USER 

SET 

P_D_BEGIN = (SELECT to_number(to_char(D_BEGIN, 'j')) - 2415019 FROM ACTIONS WHERE K_ACTION=ACTI_USER.K_ACTION), 

P_D_END = (SELECT to_number(to_char(D_end, 'j')) - 2415019 FROM ACTIONS WHERE K_ACTION=ACTI_USER.K_ACTION), 

ISAGENDA = 

(SELECT 

CASE 

WHEN ACTIONS.PLANNED = '1' AND ACTI_USER.ISACTIVE = '1'  AND (ACTI_USER.STATUS IS NULL OR ACTI_USER.STATUS IN ('', '0', '2', '3', '5', '6')) 

THEN '1' 

ELSE '0' 

END CASE 

FROM ACTIONS 

JOIN ACTI_USER ON ACTIONS.K_ACTION = ACTI_USER.K_ACTION 

and acti_user.rowid = V_ROWID_ARRAY(I)) 

WHERE 

ROWID = V_ROWID_ARRAY(I); 

COMMIT; 

EXIT WHEN C_ACTI_USER%NOTFOUND; 

END LOOP; 

CLOSE C_ACTI_USER; 


END; 

/ 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Geoffrey&lt;/p&gt;
</description>
<category>2014 - r6640</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=888/r6640-actions-not-displayed-in-the-agenda</guid>
<pubDate>Thu, 22 Oct 2015 09:57:09 +0000</pubDate>
</item>
</channel>
</rss>