Project
YouTrackSharp
Priority
Normal
Type
Bug
State
Fixed
Assignee
Hadi Hariri
Subsystem
No subsystem
Fix versions
No Fix versions
Affected versions
No Affected versions
Fixed in build
1.0.72.0  
  • Created by   Hadi Hariri (Admin)
    19 months ago (19 Oct 2011 13:19)
  • Updated by   Hadi Hariri (Admin)
    15 months ago (05 Mar 2012 19:00)
 
YTSRP-15 Assignee not assigned
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
I have assigned a user to an issue in YouTrack. When I request that's projects issues via YouTrackSharp, the Issue items that come back do not have their Assignee property populated.


Here is the response body:

Date: Fri, 07 Oct 2011 16:45:51 GMT
Transfer-Encoding: chunked
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8

{
"issue": {
"@id": "V9-2",
"field": [
{
"@name": "voterName"
},
{
"@name": "Priority",
"value": "Normal"
},
{
"@name": "Type",
"value": "Feature"
},
{
"@name": "State",
"value": "Submitted"
},
{
"@name": "Assignee",
"value": "michael"
},
{
"@name": "Subsystem",
"value": "Scheduling"
},
{
"@name": "projectShortName",
"value": "V9"
},
{
"@name": "numberInProject",
"value": "2"
},
{
"@name": "summary",
"value": "ADD a feature to the scheduling screen for a PMT to reset the clock"
},
{
"@name": "created",
"value": "1317928586123"
},
{
"@name": "updated",
"value": "1318005246437"
},
{
"@name": "updaterName",
"value": "root"
},
{
"@name": "reporterName",
"value": "pwright"
},
{
"@name": "commentsCount",
"value": "0"
},
{
"@name": "votes",
"value": "0"
}
]
}
}
Comments (12)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Hadi Hariri (Admin)
  Hadi Hariri (Admin)
19 Oct 2011 13:26
19 months ago
I can't reproduce this. I've created a new test despite it working and the test also works.
Related Changes
Resolved Date
19 months ago (19 Oct 2011 13:27)
State
SubmittedCan't Reproduce
Will
  Will
19 Oct 2011 14:24
19 months ago
Switched the connection to use our local 3.0.4 YouTrack server with one of our issues. The test fails:

------ Test started: Assembly: YouTrackSharp.Specs.dll

YTSRP15
ยป should contain assignee (FAIL)

Test 'should contain assignee' failed:
JsonFx.Serialization.DeserializationException: Unable to find a suitable constructor for instantiating the target Type. (YouTrackSharp.Issues.Field[]) ---> JsonFx.Serialization.TypeCoercionException: Unable to find a suitable constructor for instantiating the target Type. (YouTrackSharp.Issues.Field[])
JsonFx.Serialization.DeserializationException: Unable to find a suitable constructor for instantiating the target Type. (YouTrackSharp.Issues.Field[]) ---> JsonFx.Serialization.TypeCoercionException: Unable to find a suitable constructor for instantiating the target Type. (YouTrackSharp.Issues.Field[])
 at JsonFx.Serialization.TypeCoercionUtility.InstantiateObject(Type targetType, Object args)
 at JsonFx.Serialization.TypeCoercionUtility.CoerceType(Type targetType, IDictionary`2 value)
 at JsonFx.Serialization.TypeCoercionUtility.CoerceType(Type targetType, Object value)
 at JsonFx.Model.ModelAnalyzer.ConsumeObject(IStream`1 tokens, Type targetType)
 at JsonFx.Model.ModelAnalyzer.ConsumeValue(IStream`1 tokens, Type targetType)
 at JsonFx.Model.ModelAnalyzer.ConsumeObject(IStream`1 tokens, Type targetType)
 at JsonFx.Model.ModelAnalyzer.ConsumeValue(IStream`1 tokens, Type targetType)
 at JsonFx.Model.ModelAnalyzer.<Analyze>d__0.MoveNext()
 at JsonFx.Serialization.DataReader`1.ReadSingle(ITextTokenizer`1 tokenizer, IEnumerable`1 tokens, Type targetType)
--- End ---
 at JsonFx.Serialization.DataReader`1.ReadSingle(ITextTokenizer`1 tokenizer, IEnumerable`1 tokens, Type targetType)
 at JsonFx.Serialization.DataReader`1.Read(String input, Type targetType)
 at JsonFx.Serialization.DataReader`1.Read[TResult](String input)
 at EasyHttp.Codecs.DefaultDecoder.DecodeToStatic[T](String input, String contentType)
 at EasyHttp.Http.HttpResponse.StaticBody[T]()
    Infrastructure\Connection.cs(104,0): at YouTrackSharp.Infrastructure.Connection.Get[T](String command)
    Issues\IssueManagement.cs(67,0): at YouTrackSharp.Issues.IssueManagement.GetIssue(String issueId)
    Bugs\IssueManagementBugs.cs(53,0): at YouTrackSharp.Specs.Bugs.YTSRP15.<.ctor>b__0()
 at Machine.Specifications.Utility.RandomExtensionMethods.<InvokeAll>b__3(Action x)
 at Machine.Specifications.Utility.RandomExtensionMethods.<InvokeAll>b__3(Action x)
 at Machine.Specifications.Utility.RandomExtensionMethods.Each[T](IEnumerable`1 enumerable, Action`1 action)
 at Machine.Specifications.Utility.RandomExtensionMethods.InvokeAll(IEnumerable`1 actions)
 at Machine.Specifications.Utility.RandomExtensionMethods.InvokeAll(IEnumerable`1 becauseActions)
 at Machine.Specifications.Model.Context.EstablishContext()

0 passed, 1 failed, 0 skipped, took 1.90 seconds (Machine.Specifications 0.4.23-cf12f15).
Will
  Will
21 Oct 2011 08:18
19 months ago
Here's the content of the RawText property of the httpResponse, before calling StaticBody on it, which causes the above exception, inside YouTrackSharp.Infrastructure.Connection.cs (line 103):

{"@id":"V9-6","field":{"@name":"voterName"},"comment":{"@id":"63-4","@author":"wgreen","@issueId":"V9-6","@deleted":"false","@text":"Acceptance Criteria presenters will be changed to batch up changes in memory rather than submit the directly. Then the Approval workflow will be intitiated. Only after this workflow is complete will the changes be sent to the domain (and thereby the database)","@shownForIssueAuthor":"false","@created":"1318432040908","replies":null},"field":[{"@name":"Priority","value":"Normal"},{"@name":"Type","value":"Feature"},{"@name":"State","value":"Fixed"},{"@name":"Assignee","value":"michael"},{"@name":"Subsystem","value":"No subsystem"},{"@name":"Fixed in build","value":"9.30.51.222"},{"@name":"links","value":{"@type":"Depend","@role":"is required for","$":"V9-3"}},{"@name":"projectShortName","value":"V9"},{"@name":"numberInProject","value":"6"},{"@name":"summary","value":"Entering a new reference value should require an approval by an IST Engineer and/or peer"},{"@name":"created","value":"1317928959793"},{"@name":"updated","value":"1319051447324"},{"@name":"updaterName","value":"wgreen"},{"@name":"resolved","value":"1319051447317"},{"@name":"reporterName","value":"pwright"},{"@name":"commentsCount","value":"1"},{"@name":"votes","value":"0"}]}
Shane Cusson
  Shane Cusson
21 Oct 2011 14:23
19 months ago
I'm running into the same issue. If I do a .GetAllIssuesForProject() or a .GetIssuesBySearch("#unresolved"), the Assignee is always null.
Hadi Hariri (Admin)
  Hadi Hariri (Admin)
22 Oct 2011 04:41
19 months ago
Shane, Will, I've just pushed a new version that changes the way issues are parsed. Can you take a look? Shane, can you offer me some more details? I'm really baffled by this.
Hadi Hariri (Admin)
  Hadi Hariri (Admin)
22 Oct 2011 05:10
19 months ago
It shouldn't be the custom fields since a lot of the values right now are custom fields. Also, I've added a new one you had numberInProject and it still works....
Shane Cusson
  Shane Cusson
24 Oct 2011 09:06
19 months ago
I tried the latest, still no dice. I grabbed the source, found the command being run. "Assignee" was actually "AssigneeName" in my results. I updated line 48 of Issue.cs to "AssigneeName". Recompiled and it's working now.
Hadi Hariri (Admin)
  Hadi Hariri (Admin)
24 Oct 2011 10:41
19 months ago
Ah. So this a problem of custom fields....OK. That's going to be an issue :(. Let me think how to solve it. Will, is yours the same?
Shane Cusson
  Shane Cusson
24 Oct 2011 11:10
19 months ago
AssigneeName isn't custom for me, I'm running YouTrack 3.0.4 (build #1819 [07-Sep-2011 19:48], here's the command generated:

http://[servername removed]:9500/rest/project/issues/E9?max=2147483647&after=0

Here's the first result:

<issue priority="1" type="Bug" state="Closed" subsystem="Customizations" id="E9-1" projectShortName="E9" assigneeName="cussonsh" reporterName="cussonsh" updaterName="cussonsh" fixedInBuild="Next build" commentsCount="1" numberInProject="1" summary="SO Entry" description="Auto-Allocate needs to be fixed" created="1307556519592" updated="1307650686716" historyUpdated="1307650686718" resolved="1307650686716" votes="0">
<links/>
<attachments/>
<field name="ETA"/>
</issue>

I'd like to get access to the "ETA" custom field. But "AssigneeName" is stock as far as I can tell. We havent modified it.
Hadi Hariri (Admin)
  Hadi Hariri (Admin)
24 Oct 2011 11:37
19 months ago
Can you send me a screenshot of your Custom Fields?
Shane Cusson
  Shane Cusson
24 Oct 2011 13:11
19 months ago
Attached.
Related Attachments
Shane Cusson
  Shane Cusson
24 Oct 2011 13:13
19 months ago
On a similar note, I added the "Created" field to Issue.cs as a long. It comes across no problem.