Project

General

Profile

Issue Custom Field

Added by Thomas Kohler over 11 years ago

Hello, I'm developing the redmine plugin for importing RequisitePro Baselines. Since some days I'm looking for the correct solution to add custom values to the issues. Please can anybody explain me the following things in difference and usage:

- IssueCustomField <-> CustomField
- CustomFieldValue <-> CustomValue

- issue.custom_field_values <-> issue.custom_values

And additional: In my opinion the functionality "available_custom_fields" of "acts_as_customizable.rb" is good, but overridden of an bad one in "app/models/issues.rb" (see below). Eventually this caused my trouble? Can anybody explain me this method below?

'# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
def available_custom_fields
(project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields.all) : []
end

Thanks in advance, Thomas


Replies (1)

RE: Issue Custom Field - Added by Thomas Kohler over 11 years ago

Ok, now I have understand the second method:
Available custom fields for issues are only really available for the actual issue in case the issue is of the type of tracker where the custom field is assigned to AND the custom field is assigned to the actual project. Therefore the method seems to be very correct for issues.

    (1-1/1)