Project

General

Profile

Actions

Defect #16932

closed

saving custom_fields

Added by Brett Dudo about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I'm using redmine 2.3.1devel

using ruby's ActiveResource::Base to find an issue, and I can update the status fine, but the custom_fields seem to elude me.

issue = Issue.find(issue_id)
return unless issue
ready = issue.custom_fields.select{|i| i.name == 'Ready for testing'}.first
deployed_to = issue.custom_fields.select{|i| i.name == 'Deployed to'}.first
issue.subject = 'test'
ready.value = '1' #['0', '1']
deployed_to.value = "staging" #['staging', 'production']
issue.save

This updates the subject fine, but the custom fields are not updated in redmine. http://stackoverflow.com/questions/23749065/redmine-saving-of-custom-fields-from-ruby-api (i created this ticket over at SO, too).

Is this taken care of in a newer version? Am I just doing something wrong? Thanks for the help!

Actions

Also available in: Atom PDF