How to use ParameterVariable using plain java API to run parameterized query?
Hi. . . I'm trying to run a shared query that has a run-time variable - i.e., when the user runs it from the UI RTC prompts them for a value for the variable expression. I've search this site as well as Ralph Schoon's blog but didn't find anything.
I've found the query.setParameterValues(arg0) method and it seems promising but I'm not sure how to set up an Expression:
ParameterVariableContext ctx = new ParameterVariableContext();
Any suggestions or examples would be greatly appreciated!
Andy
|
One answer
I didn't find out exactly how to replace parameterized expressions in a saved query, I guess in my case it wasn't strictly required. I used some code from Ralph (link above) to just create a query on the fly that served my purpose:
public List<String> findWorkitemsByIssue(String issuenumber) throws TeamRepositoryException{ AttributeExpression projectAreaExpression = new AttributeExpression( |
Your answer
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.