Clarity

  • 1.  How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Jul 23, 2018 02:49 PM

    I Have a custom Object that need to access the Create Issue page of the current project. I found no way of doing that using Create Action Internal Link ( there is no link from the custom object to the Create Issue page), neither could i create an external link to the Create Issue Page, since there is no project ID paramter I can use to mount the Create Issue link...

     

    Any idea ?

     

    Thanks

     

    Joni



  • 2.  Re: How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Jul 24, 2018 05:55 AM

    I don't think it is possible with actions.

     

    However, we can use the following approach:

    1. Create a string attribute and mark it as "Enter Once" from Fields

    2. Create a custom process that triggers on creation of a new instance

      a. In this custom process, determine the Instance ID using ${gel_objectInstanceId} tag

      b. Write a SQL to fetch information about the parent Project on which this custom instance is being created

      c. Using the above info, do a XOG, and update the attribute created in Step 1 with the URL to navigate to New Issues create page

    3. The New Issues create page URL should take a format like this: http://<Host Name>/niku/nu#action:itl.issueList&id=5017001&ui.page.space=mainnav.work

     

    The SQL that you can make use of in step 2b will look like this (This SQL is for SQL Server):

    select occ.id, occ.name, occ.code, occ.odf_parent_id,
    concat('http://<Host Name>/niku/nu#action:itl.issueList&id=',odf_parent_id,'&ui.page.space=mainnav.work') b,
    ii.code pCode
    from odf_ca_comobj occ
    join inv_investments ii on ii.id = occ.odf_parent_id
    where occ.id = ${gel_objectInstanceId}

     

    A screenshot of how a sample implementation of this approach looks to me:



  • 3.  Re: How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Jul 24, 2018 06:47 AM

    Incidentally the TIP : How To Put Any Dynamically Generated Value On A Clarity Object  technique could achieve the same as Jeevan suggests but without needing the process/gel script/xog.



  • 4.  Re: How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Jul 24, 2018 08:30 AM

    Yes. I agree. This technique cuts down on a lot of effort, both in terms of getting it implemented, and in terms of maintaining it.

     

    David,

    One quick clarification though.. I went through the doc, and tried to create a link.. My SQL looks like this:

    select
    @select:1:dummy_id@,
    @select:x.x0:x0@

    from(

    select '<a href = "http://<Host Name>/niku/nu#action:itl.issueList&id=' || @WHERE:PARAM:USER_DEF:INTEGER:object_id@ || '&ui.page.space=mainnav.work"> New Issues </a>' x0
    from dual

    union

    select 'No Link Available' x0
    from dual

    )x

    where @filter@

     

    And the output is as below. The link doesn't get formatted.. I don't know if I'm missing out on something obvious in configuring this attribute.. 



  • 5.  Re: How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Jul 24, 2018 08:53 AM

    [Fields] setting on the lookup needs to be Pull-Down not Browse



  • 6.  Re: How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Jul 24, 2018 09:20 AM

    Thank you! Works really well



  • 7.  Re: How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Jul 24, 2018 10:40 AM

    Thanks all for your replies.

     

    I am going with the David solution, but when I tried to convert the Oracle query to SQL I get an error.

     

    What is the correct SQL query to use? Here is the SQL code I am using which is giving an error:

     

    select
    @select:1:dummy_id@,
    @select:x.x0:x0@
    from(
    select '<a href = "http://192.168.1.50/niku/nu#action:itl.issueList&id='+ ISNULL(@WHERE:PARAM:USER_DEF:INTEGER:object_id@,'') + '&ui.page.space=mainnav.work"> New Issues </a>' x0
    from dual
    union
    select 'No Link Available' x0
    )x
    where @filter@

     

    objectID is mapped to the PK_ID of the issue Object.



  • 8.  Re: How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Jul 24, 2018 10:52 AM

    This one works for me:

     

    select
    @select:1:dummy_id@,
    @select:x.x0:x0@

    from(

    select concat('<a href = "http://<Host Name>/niku/nu#action:itl.issueList&id=',@WHERE:PARAM:USER_DEF:INTEGER:object_id@,'&ui.page.space=mainnav.work"> New Issues </a>') x0

    union

    select 'No Link Available' x0

    )x

    where @filter@



  • 9.  Re: How to create an Object Action to LInk directly to a New Issue Object on a current Project

    Posted Aug 01, 2018 03:36 AM

    To add to this, we have a custom object Code Constants where we then store the 'hostname'.  The SQL then pulls this value so the SQL would look like

    select (select cc_st from odf_ca_cost_constants where code = 'ENVNAME') || '/nu#action:itl.issueList&id=',@WHERE:PARAM:USER_DEF:INTEGER:object_id@

    from dual.

     

    When the Development environment is refreshed from PROD, then the Code Constant is updated to reflect the DEV environment, so you aren't left with URL's pointing to PROD from the DEV environment.

     

    Naturally the above is just a sample SQL and would have to be modified to what you have called your Code Constant object.