Get issues by custom field
Hi,
could you advise how i should contruct IssuesFilterEN (format of CustomFields or SavedCustomFields) to fetch all issues (using Web Services SDK/Java), which
1) belong to one of several projects; 2) assigned to specific user (no matter open or not); 3) have text custom field 'A' that contains 'B' in its value
(i'm a bit confused about item 3 now)
ShL77
· 1 |
|
Thursday, December 30, 2010, 10:21:19 PM |
0
|
PS I use v3.7.2 Build 2784 |
||||
|
0
|
There you go: |
||||
|
0
|
Hi, Thanks for the answer, but my environment is Java, so i wonder what is the right way to define IssuesFilterEN class for use with services (i'm checking http://api.countersoft.com/Schema.aspx?entity=IssuesFilterEN and the data types are not quite clear ). Based on your reply, i assume CustomFields should be the array of CustomFieldEN, correct? |
||||
|
0
|
Most of the types are strings excpet of:
|
||||
|
0
|
Hi, I get 500 error when trying to get results and based on error log (below), it looks like some mandatory field is not set. Could you advise? could not resolve property: null of: CounterSoft.Gemini.Commons.Entity.IssueEN at NHibernate.Persister.Entity.AbstractPropertyMapping.ToType(String propertyName) at NHibernate.Persister.Entity.AbstractEntityPersister.GetSubclassPropertyTableNumber(String propertyPath) at NHibernate.Persister.Entity.BasicEntityPropertyMapping.ToColumns(String alias, String propertyName) at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetColumns(String propertyName, ICriteria subcriteria) at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetColumnAliasesUsingProjection(ICriteria subcriteria, String propertyName) at NHibernate.Criterion.Order.ToSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery) at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetOrderBy() at NHibernate.Loader.Criteria.CriteriaJoinWalker..ctor(IOuterJoinLoadable persister, CriteriaQueryTranslator translator, ISessionFactoryImplementor factory, ICriteria criteria, String rootEntityName, IDictionary |
||||
|
0
|
Can you please post the XML you are posting? |
||||
|
0
|
Hi, Looks like i've figured out the problem. Had to initialize fields to empty strings ("null" value caused this issue) |
||||
|
0
|
Hi, One more question: is there any way to make sure both COMMENTS and HISTORY is loaded for all items that are returned by the mentioned '/filters' request? It looks like comments are not part of the response and one should request comments for each issue explicitly, the same with history. My goal is to apply some filtering on historical information and retrieve the last comment done by specific user for each issue that is a part of the response. |
||||
|
0
|
The comments should be part of the returned result. Are you sure they are not? |
||||
|
0
|
Hi! Thanks for the tip! I've tried http://geminihost/api/issues.ashx/issues/startpage/1/pagesize/1000/includeatt achments/0/pagedissues but it returns 500 with the following errors logged on server side
Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at CounterSoft.Gemini.Web.Api.RestHandler.GetResponse(RequestDetails rd, MethodInfo method) |
||||
|
0
|
The api reference seems to be wrong, the url should be: |
||||
|
0
|
Thanks, will check it out. PS wrong api URL was taken from http://api.countersoft.com/ApiIssues.aspx#Filtered |
||||
|
0
|
For /api/issues.ashx/paged?startpage=1&pagesize=1000&includeattachments=0 i got (NOTE: the same request w/o paging works fine)
could not resolve property: of: CounterSoft.Gemini.Commons.Entity.IssueEN at NHibernate.Persister.Entity.AbstractPropertyMapping.ToType(String propertyName) at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetType(ICriteria subcriteria, String propertyName) at NHibernate.Criterion.PropertyProjection.GetTypes(ICriteria criteria, ICriteriaQuery criteriaQuery) at NHibernate.Criterion.ProjectionList.GetTypes(ICriteria criteria, ICriteriaQuery criteriaQuery) at NHibernate.Criterion.Distinct.GetTypes(ICriteria criteria, ICriteriaQuery criteriaQuery) at NHibernate.Loader.Criteria.CriteriaJoinWalker..ctor(IOuterJoinLoadable persister, CriteriaQueryTranslator translator, ISessionFactoryImplementor factory, ICriteria criteria, String rootEntityName, IDictionary Error Gemini Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at CounterSoft.Gemini.Web.Api.RestHandler.GetResponse(RequestDetails rd, MethodInfo method) |
||||
|
0
|
Can you please post the XML you are posting? |
||||
|
0
|
The xml is <IssuesFilterEN><Resources>87|</Resources><ProjectID>33|</ProjectID><UserID>87</UserID><CustomFields><GenericEN><GenericKey>10</GenericKey><GenericValue>2010/53 |
||||
|
0
|
You need to set the sort field of the filter: |
||||
|
0
|
Hi! Thanks, it's helped! |
||||
|
0
|
Hi, I've just noticed that the IssueHistory is ONLY filled for the first item of such "paged" response. Can you advise? |
||||
|
0
|
ANSWER
This is a bug: http://gemini.countersoft.com/Default.aspx?p=2&i=4269 which will be fixed in 4.0. |
||||
|