Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

CREATE PROCEDURE "RELEASE_MANAGER"."CHANGE_RELEASE_MODE" ( nModeCode IN NUMBER, nRtagId IN NUMBER, UserId IN NUMBER ) IS
/* ---------------------------------------------------------------------------
    Version: 3.0.0
   --------------------------------------------------------------------------- */

        cMode CHAR(1) := NULL;  
        nProjId NUMBER; 

BEGIN
         

        /*
        Author: Rupesh Solanki
        Modified: 24th October 2006
        Reason: Added the archive mode state into Release Manager 
        ||      1 - Open Mode
        ||      2 - Restrictive Mode
        ||      3 - Closed Mode
        ||      4 - CCB Mode
        ||      5 - Archive Mode
        */      
        -- Get project Id
        SELECT rt.PROJ_ID INTO nProjId
          FROM RELEASE_TAGS rt
         WHERE rt.RTAG_ID = nRtagId; 
        
        IF nModeCode = 1 THEN
                -- Open Mode
                cMode := 'N';
                
                /* LOG ACTION */
                Log_Project_Action ( nProjId, 'set_to_open_mode', UserId, 'Release is set to Open Mode', nRtagId );
                
        ELSIF nModeCode = 2 THEN
                -- Restrictive Mode
                cMode := 'R';
                
                /* LOG ACTION */
                Log_Project_Action ( nProjId, 'set_to_restrictive_mode', UserId, 'Release is set to Restrictive Mode', nRtagId );
                
        ELSIF nModeCode = 3 THEN
                -- Closed Mode
                cMode := 'Y';
                
                /* LOG ACTION */
                Log_Project_Action ( nProjId, 'set_to_closed_mode', UserId, 'Release is set to Closed Mode', nRtagId  );

        ELSIF nModeCode = 4 THEN
                -- CCB Mode
                cMode := 'C';
                
                /* LOG ACTION */
                Log_Project_Action ( nProjId, 'set_to_ccb_mode', UserId, 'Release is set to CCB Mode', nRtagId  );
        
        ELSIF nModeCode = 5 THEN
                -- Archive Mode
                cMode := 'A';
                
                /* LOG ACTION */
                Log_Project_Action ( nProjId, 'set_to_archive_mode', UserId, 'Release is set to Archive Mode', nRtagId  );      
                                
                
        END IF;
        
        
        
        -- Now update table
        IF NOT cMode IS NULL THEN
                UPDATE RELEASE_TAGS rt SET
                rt.OFFICIAL = cMode
                WHERE rt.RTAG_ID = nRtagId;
                
        END IF;


END CHANGE_RELEASE_MODE;
/