views:

270

answers:

1

I'm trying to write a small Rails app that will interface with Jira using the Jira4R gem. However, whilst I'm having no problem creating an issue, I'm having real trouble attaching a custom field to an issue.

Any ideas on how I would do this?

At the moment I'm creating the issue like:

issue = Jira4R::V2::RemoteIssue.new
issue.project = "TEST"
issue.summary = params[:issue][:summary]
issue.description = params[:issue][:description]
issue.type = 6
issue = @jira.createIssue(issue)
+1  A: 
   issue = Jira4R::V2::RemoteIssue.new
   issue.project = "TEST"
   issue.summary = params[:issue][:summary]
   issue.description = params[:issue][:description]
   issue.type = 6

   c = Jira4R::V2::RemoteCustomFieldValue.new
   c.customfieldId = "customfield_10000"
   c.values = current_user.full_name

   issue.customFieldValues = [c]
   issue = @jira.createIssue(issue)
Neil Middleton