Release Notes and Announcements

Expand all | Collapse all

Retrieve Filter Details

  • 1.  Retrieve Filter Details

    Posted 08-18-2018 02:51
    Edited by Sathish Babu 08-18-2018 02:52
    Hi,

    Is any one tried to retrieve filters details using filter ID?

    I have filter id, now i want to retrieve the name of filters using id to show in the report. I tried by using FilterDao but its not working, am getting empty result only.

    Example:
    #set($filterDao = $applicationContext.getBean("filterDao"))
    #set($filterDet = $filterDao.getFilter(3404))

    Output:

    FilterDet: $filterDet

    Please correct me if i am doing anything wrong.

    Thanks in advance.




    ------------------------------
    Sathish Babu
    ------------------------------


  • 2.  RE: Retrieve Filter Details

    Posted 08-20-2018 12:31
    Hi Sathish -
    I am not sure this query will work, but sometimes when passing in an integer, you need to convert it to an integer at the same time.

    Try:
    #set($filterDao = $applicationContext.getBean("filterDao"))
    #set($filterDet = $filterDao.getFilter($mathTool.toInteger(3404)))

    Hope that helps.

    ------------------------------
    Shawnna Williams
    Jama Software
    ------------------------------



  • 3.  RE: Retrieve Filter Details

    Posted 08-21-2018 02:14
    Hi Shawna,

    Thanks for the reply.

    I tried to convert the integer value as you said, but its not working and i am not getting result for that dao.

    Do we need to any other supporting dao's for FilterDao?

    ------------------------------
    Sathish Babu
    ------------------------------



  • 4.  RE: Retrieve Filter Details

    Posted 08-21-2018 02:22
    Hi Harald,

    Do we have any query to retrive filters details using filter id?. i tried by running the below query to fetch the detail

    #set($filterQuery = $session.createQuery("select fil from Filter as fil where fil.id = :filterId"))

    But its giving empty result only.

    Is there anyway to get filters details, i have filter id in my hand?

    ------------------------------
    Sathish Babu
    ------------------------------



  • 5.  RE: Retrieve Filter Details

    Posted 08-21-2018 04:37
    Hi Sathish,

    Should be possible with the Rest-API

    https://<JamaUrl>/rest/latest/filters/<filter-id>/results

    But calling that authenticated from the velocity template is the challenge.

    regards
    Harald

    ------------------------------
    Harald Hotz-Behofsits
    Frequentis AG
    ------------------------------



  • 6.  RE: Retrieve Filter Details

    Posted 08-24-2018 03:30
    Hi Harald,

    Sorry, really i dont know how to use Rest API in Velocity template.

    Can you please help me to pull out filter name from Jama using filter id?

    I have used FilterDAO also, but its not outputting the result.

    ------------------------------
    Sathish Babu
    ------------------------------