How to pass condition value to a query prompt through the URL?
I created a query that prompts for Filed Against by selecting "Enable input of condition values when query is run" for Filed Against when configuring the query. I would like to be able to pass a selected value via the URL. For example, here is the URL for the query:
https://SERVER:PORT/ccm/web/projects/PROJECTNAME#action=com.ibm.team.workitem.runSavedQuery&id=_hEzooJxaEeS7jLn4ZWIpUA Can I add something to the end of this with "&" to tell it the value I want for Filed Against so it won't prompt and will just run the query with that value? |
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
What is the reason behind this? It seems that you want to achieve something semi-dynamic, but I can't be sure. When RTC retrieves the query definition, it looks for an attribute "hasParameters". If it is true, I believe it will prompt for the parameters. If you have two parameters and you can somehow pass one in the URL, do you want RTC to prompt for the second one? There is another problem - you may not know the parameter name unless you do some debugging. For example, if I set "Created By" as a conditional filter (parameter), I get a parameter name "created91". :-)
I want to create a "menu" (html) that links a single query to each team's results by clicking on their team name. Thus I need to pass the parameter as part of the URL. The parameter will have a different value for Filed Against for each team. This should be possible.
I would like to do the same thing and more with the functionality you are asking about but I have not found any way of doing it outside of an API via Java (and truthfully don't know Java so I'm out on that one.