Is there a way of adding a 'Log' button to a customized portlet on the Project Overview?

We are adding Project Assumptions Portlet to our Project Overview and would like a button on the portlet to log project assumptions for the project instead of having to go to the main menu; similar to how Project Issues and Project Risks work.  Can anyone tell me if this is possible and if so, how to go about it?

 

Thank you!

  • I have wanted this for a while, but there is only one way I know to do it.  You will have to create a Java portlet.

  • I had a feeling that was going to be the answer. :)  Thanks Derek

  • Quick and dirty solution #1 :

    You can put the link in Portlet Definition Help section.

    I don't know if it is possible to hide javascript in this area.

     

    Quick and dirty solution #2 :

    Create a portlet definition which displays only the link who points where you want.

     

    Quick and dirty solution #3

    Rework your existing Data Source and add an UNION ALL clause which display the "log" URL/Button/what you want.

     

     

  • Thanks Alex!  I'll give your ideas a try and will let you know how it goes.  (Fingers crossed) ;)

  • Create a sql portlet and in the column add the HTMl code for button  and provide the url you want to  open .

     

    it can be like this 

    Select <input type="button" name="" value="<button name>" onclick="javascript&colon;window.open (<URL>) -- any atribuite of Html you want to add>  from dual

  • Verified Answer

    Problem Solved!  Here's the SQL we used to have a portlet with buttons on the Project Overview tab to log Assumptions, Decisions, Risks, Issues, Changes, and Status Reports.  Hope others find this beneficial!  The IS_QUALIFIED and IS_ELIGIBLE determines if the logged on user has access to create these types of project requests and ensures that the project is in the correct status to allow the request to be created.  The HAS_AG determines if the user has the correct access grant(s) for creating the request.

    SELECT DECODE(ASM_REQ_ID, NULL, '', DECODE(IS_QUALIFIED || IS_ELIGIBLE, 'YY','<!--HTML--> <input type="button" onclick="javascript&colon;window.parent.location.assign(''/itg/web/knta/crt/RequestCreate.jsp?REQUEST_TYPE_CREATE=' || LENGTH(ASM_REQ_ID) || '.' || LENGTH(ASM_REQ_NAME) || '.' || ASM_REQ_ID || '.' || ASM_REQ_NAME || '&loggingIssue=true&projectId=[P.PROJECT_ID]&projectName=' || PROJNAME || ''',''NewDeliveryRequest''); return false;" id="ASMSubmitButton"  style="{ width: 120px; }" class="sec-btn"  value="Log Assumption" />', '') ) ASSUMPTION, DECODE(ISS_REQ_ID, NULL, '', DECODE(HAS_AG || IS_ELIGIBLE, 'YY','<!--HTML--> <input type="button" onclick="javascript&colon;window.parent.location.assign(''/itg/web/knta/crt/RequestCreate.jsp?REQUEST_TYPE_CREATE=' || LENGTH(ISS_REQ_ID) || '.' || LENGTH(ISS_REQ_NAME) || '.' || ISS_REQ_ID || '.' || ISS_REQ_NAME || '&loggingIssue=true&projectId=[P.PROJECT_ID]&projectName=' || PROJNAME || ''',''NewDeliveryRequest''); return false;" id="ISSSubmitButton"  style="{ width: 120px; }" class="sec-btn"  value="Log Issue" />', '') ) ISSUE, DECODE(RSK_REQ_ID, NULL, '', DECODE(HAS_AG || IS_ELIGIBLE, 'YY','<!--HTML--> <input type="button" onclick="javascript&colon;window.parent.location.assign(''/itg/web/knta/crt/RequestCreate.jsp?REQUEST_TYPE_CREATE=' || LENGTH(RSK_REQ_ID) || '.' || LENGTH(RSK_REQ_NAME) || '.' || RSK_REQ_ID || '.' || RSK_REQ_NAME || '&loggingIssue=true&projectId=[P.PROJECT_ID]&projectName=' || PROJNAME || ''',''NewDeliveryRequest''); return false;" id="RSKSubmitButton"  style="{ width: 120px; }" class="sec-btn"  value="Log Risk" />', '') ) RISK, DECODE(PSC_REQ_ID, NULL, '', DECODE(IS_QUALIFIED || IS_ELIGIBLE, 'YY','<!--HTML--> <input type="button" onclick="javascript&colon;window.parent.location.assign(''/itg/web/knta/crt/RequestCreate.jsp?REQUEST_TYPE_CREATE=' || LENGTH(PSC_REQ_ID) || '.' || LENGTH(PSC_REQ_NAME) || '.' || PSC_REQ_ID || '.' || PSC_REQ_NAME || '&loggingIssue=true&projectId=[P.PROJECT_ID]&projectName=' || PROJNAME || ''',''NewDeliveryRequest''); return false;" id="PSCSubmitButton"  style="{ width: 120px; }" class="sec-btn"  value="Log Change" />', '') ) CHANGE, DECODE(DCS_REQ_ID, NULL, '', DECODE(IS_QUALIFIED  || IS_ELIGIBLE, 'YY','<!--HTML--> <input type="button" onclick="javascript&colon;window.parent.location.assign(''/itg/web/knta/crt/RequestCreate.jsp?REQUEST_TYPE_CREATE=' || LENGTH(DCS_REQ_ID) || '.' || LENGTH(DCS_REQ_NAME) || '.' || DCS_REQ_ID || '.' || DCS_REQ_NAME || '&loggingIssue=true&projectId=[P.PROJECT_ID]&projectName=' || PROJNAME || ''',''NewDeliveryRequest''); return false;" id="DCSSubmitButton"  style="{ width: 120px; }" class="sec-btn"  value="Log Decision" />', '') ) DECISION, DECODE(PSR_REQ_ID, NULL, '', DECODE(IS_QUALIFIED || IS_ELIGIBLE, 'YY','<!--HTML--> <input type="button" onclick="javascript&colon;window.parent.location.assign(''/itg/web/knta/crt/RequestCreate.jsp?REQUEST_TYPE_CREATE=' || LENGTH(PSR_REQ_ID) || '.' || LENGTH(PSR_REQ_NAME) || '.' || PSR_REQ_ID || '.' || PSR_REQ_NAME || '&loggingIssue=true&projectId=[P.PROJECT_ID]&projectName=' || PROJNAME || ''',''NewDeliveryRequest''); return false;" id="PSRSubmitButton"  style="{ width: 120px; }" class="sec-btn"  value="Create Status Report" />', '') ) PSR
    FROM
    (SELECT
      (SELECT 'Y'
      FROM DUAL
      WHERE EXISTS
        (SELECT kfpp.prj_project_manager_user_id,  kfpp.prj_project_manager_username
        FROM kcrt_fg_pfm_project kfpp
        WHERE 1                                                         = 1
        AND kfpp.prj_project_id                                = '[P.PROJECT_ID]'
        AND  (INSTR (kfpp.prj_project_manager_user_id, '[SYS.USER_ID]') > 0)
        )
        OR EXISTS
      (SELECT 'Y'
      FROM DUAL
      WHERE EXISTS
        (SELECT ksg.SECURITY_GROUP_ID, ksg.SECURITY_GROUP_NAME
         FROM KNTA_USER_SECURITY kus
         JOIN KNTA_SECURITY_GROUPS_NLS ksg ON ksg.SECURITY_GROUP_ID = kus.SECURITY_GROUP_ID AND ((ksg.SECURITY_GROUP_NAME = 'PPM Administrator' AND kus.USER_ID = '[SYS.USER_ID]') OR
         (ksg.SECURITY_GROUP_NAME = 'PPM PPMO' AND kus.USER_ID = '[SYS.USER_ID]'))
        )
      )) IS_QUALIFIED,
         (SELECT 'Y'
        FROM DUAL
        WHERE EXISTS
          (SELECT ag.ACCESS_GRANT_ID, ag.ACCESS_GRANT_NAME, acs.SECURITY_GROUP_ID, sg.SECURITY_GROUP_NAME
          FROM KNTA_ACCESS_GRANTS ag
          JOIN KNTA_ACCESS_SECURITY acs ON acs.ACCESS_GRANT_ID IN ag.ACCESS_GRANT_ID
          JOIN KNTA_USER_SECURITY us ON us.SECURITY_GROUP_ID = acs.SECURITY_GROUP_ID AND us.USER_ID = '[SYS.USER_ID]'
          JOIN KNTA_SECURITY_GROUPS_V sg ON sg.SECURITY_GROUP_ID = acs.SECURITY_GROUP_ID
          WHERE 1 = 1
          AND (UPPER(ag.ACCESS_GRANT_NAME) = 'EDIT REQUESTS' OR UPPER(ag.ACCESS_GRANT_NAME) = 'EDIT ALL REQUESTS')
          )
        ) HAS_AG,
      (SELECT KFPP2.PRJ_PROJECT_NAME
      FROM KCRT_FG_PFM_PROJECT KFPP2
      WHERE (KFPP2.PRJ_PROJECT_ID = '[P.PROJECT_ID]')
      ) PROJNAME ,
      (SELECT ISS.REQUEST_TYPE_ID
      FROM KCRT_REQUEST_TYPES ISS
      WHERE ISS.REQUEST_TYPE_NAME = 'Project Issue'
      AND ENABLED_FLAG            = 'Y'
      ) ISS_REQ_ID,
      ( 'Project Issue'
      ) ISS_REQ_NAME ,
     (SELECT RSK.REQUEST_TYPE_ID
      FROM KCRT_REQUEST_TYPES RSK
      WHERE RSK.REQUEST_TYPE_NAME = 'Project Risk'
      AND ENABLED_FLAG            = 'Y'
      ) RSK_REQ_ID,
      ( 'Project Risk'
      ) RSK_REQ_NAME ,
     (SELECT ASM.REQUEST_TYPE_ID
      FROM KCRT_REQUEST_TYPES ASM
      WHERE ASM.REQUEST_TYPE_NAME = 'Project Assumption'
      AND ENABLED_FLAG            = 'Y'
      ) ASM_REQ_ID,
      ( 'Project Assumption'
      ) ASM_REQ_NAME ,
     (SELECT PSC.REQUEST_TYPE_ID
      FROM KCRT_REQUEST_TYPES PSC
      WHERE PSC.REQUEST_TYPE_NAME = 'Project Scope Change Request'
      AND ENABLED_FLAG            = 'Y'
      ) PSC_REQ_ID,
      ('Project Scope Change Request'
      ) PSC_REQ_NAME ,
      (SELECT DCS.REQUEST_TYPE_ID
      FROM KCRT_REQUEST_TYPES DCS
      WHERE DCS.REQUEST_TYPE_NAME = 'Project Decision'
      AND ENABLED_FLAG            = 'Y'
      ) DCS_REQ_ID,
      ( 'Project Decision'
      ) DCS_REQ_NAME ,
     (SELECT PSR.REQUEST_TYPE_ID
      FROM KCRT_REQUEST_TYPES PSR
      WHERE PSR.REQUEST_TYPE_NAME = 'PPM Project Status Report'
      AND ENABLED_FLAG            = 'Y'
      ) PSR_REQ_ID,
      ( 'PPM Project Status Report'
      ) PSR_REQ_NAME ,
      (SELECT
          CASE
          WHEN prj.status IN (0,1) THEN
                CASE
                WHEN prj.DISPLAY_STATUS IN ('Pending Close Pre Exit Review',
                                                                            'Pending Close Exit Review',
                                                                            'Pending Portfolio Reconciliation') THEN
                 'N'
                ELSE
                'Y'
                END
          ELSE
          'N'
          END
          FROM pm_projects prj  WHERE prj.project_id = '[P.PROJECT_ID]'
      ) IS_ELIGIBLE
    FROM DUAL
    ) DOPTS
    WHERE 1=1
    --This section comes from the filter fields
    AND 1=1
    --End section from the filter fields