Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




How to create IssueCustomFieldData

api


How to create IssueCustomFieldData with IssueEN[] in case project is have Custom Field.

Thank you,
June

Punchai
· 1
Punchai
Replies (9)
helpful
0
not helpful

                CustomFieldDataEN[] custs = new CustomFieldDataEN[1];
                custs[0] = new CustomFieldDataEN();
                custs[0].UserID = 1;
                custs[0].ProjectID = issue.ProjectID;
                custs[0].CustomFieldID = YOUR CUSTOM FIELD ID;
                custs[0].CustomFieldData="XYZ";
                issue.IssueCustomFieldData = custs;


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Don't work, Sory I'm not sure using this issue.IssueCustomFieldData on _.CreateIssue(issue) or _.UpdateIssue(issue) with custs[0].IssueID=


Punchai
· 1
Punchai
helpful
0
not helpful

Which version of Gemini are you running?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Gemini v3.7.2 Build 2784


Punchai
· 1
Punchai
helpful
0
not helpful

Can you post the code you are using?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

IssueEN issue = new IssueEN();                
                issue.ProjectID = 47;
                issue.IssueType = model.IssueType;
                issue.IssueSummary = model.IssueSummary;           
                issue.IssueLongDesc = model.IssueLongDesc;                 

                CustomFieldDataEN[] customField = new CustomFieldDataEN[1];
                customField[0] = new CustomFieldDataEN();
                customField[0].UserID =_proxy.GetUser(User.Identity.Name).UserID;
                customField[0].ProjectID = issue.ProjectID;
                customField[0].CustomFieldID = 14;
                customField[0].CustomFieldData = model.Customer;               
                issue.IssueCustomFieldData = customField;

issue.IssueID = _proxy.CreateIssue(issue);


Punchai
· 1
Punchai
helpful
0
not helpful

Does the issue gets created (issue.IssueID contians a value)? or do you get an error?

Also, set the state of the custom field to New.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Thank, That's work.


Punchai
· 1
Punchai
helpful
0
not helpful

customField[0].State = BaseEN.EntityState.New;


Mark Wing
· 9108
Mark Wing