Actions
Defect #13118
opena_issue.project.issue_custom_fields don't work always correct
Defect #13118:
a_issue.project.issue_custom_fields don't work always correct
Status:
Reopened
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Resolution:
Invalid
Affected version:
Description
This means "a_issue.project.issue_custom_fields" and "Project.find_by_id(a_issue.project.id).issue_custom_fields" give sometimes different results. This also affect the result of the method "available_custom_fields" in issue.rb. This is only sometimes the case - don't no why.
Especially in that case "a_issue.project.issue_custom_fields.count" give also a wrong value (count like expected, but some expected entries are nil)
A simple detection is possible with:
(Project.find_by_id(a_issue.project.id).issue_custom_fields - a_issue.project.issue_custom_fields).empty?
The same for trackers:
(Tracker.find_by_id(a_issue.tracker.id).custom_fields - a_issue.tracker.custom_fields).empty?
Files
Actions