Create Issue Partial
How I creates new Issue based upon provided IssueEN object?
I try sent minimum issue data(ProjectID, IssueSummary, IssueLongDesc, ReportedBy, IssueTypeId) is don't work.
Thank, June
Punchai
· 1 |
|
Tuesday, March 15, 2011, 9:23:42 AM |
0
|
You need to make sure that you have defaults set up for your project (project administration -> default values). |
||||
|
0
|
IssueEN issue = new IssueEN(); issue.ProjectID = 47; issue.IssueSummary = item.Subject; issue.IssueLongDesc = item.Notes; issue.ReportedBy = techId; issue.IssueType = 19; issue = _proxy.CreateIssue(issue); error message:: Exception has been thrown by the target of an invocation. could not insert: [CounterSoft.Gemini.Commons.Entity.IssueBareEN][SQL: INSERT INTO geminiissues (projectid, issuetypeid, issuepriorityid, issueseverityid, issuestatusid, issueresolutionid, reportedby, fixedinversionid, summary, longdesc, revised, startdate, duedate, resolveddate, closeddate, issuerisklevelid, userdata1, userdata2, userdata3, percentcomplete, estimatedays, estimatehours, estimateminutes, visibility, visibilitymembertype, parentissueid, originatortype, originatorreply, originatordata, originatorprocessed, isparent, hierarchykey, repeated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); select SCOPEIDENTITY()] The INSERT statement conflicted with the FOREIGN KEY constraint "geminiissuesissuepriorityidfk". The conflict occurred in database "GeminiTest", table "dbo.geminiissuepriorities", column 'priorityid'. The statement has been terminated. |
||||
|
0
|
It seems like the priority use have passed it is invalid (not in the list of priorities). did you set default values? |
||||
|
0
|
Yes, I try it. IssueEN issue = new IssueEN(); issue.ProjectID = 47; issue.IssueSummary = item.Subject; issue.IssueLongDesc = item.Notes; issue.ReportedBy = techId; issue.IssueType = 19; issue.IssuePriority = 4; but is don't work. |
||||
|
0
|
ANSWER
Please check that the priority id of 4 exists in the priorities table. |
||||
|