Defect #8371 » 2013_fix_custom_field_filter.patch
redmine-1.1.3/app/models/query.rb 2011-05-19 10:00:21.265646521 -0400 | ||
---|---|---|
254 | 254 |
|
255 | 255 |
def add_short_filter(field, expression) |
256 | 256 |
return unless expression |
257 |
parms = expression.scan(/^(o|c|!\*|!|\*)?(.*)$/).first |
|
258 |
add_filter field, (parms[0] || "="), [parms[1] || ""] |
|
257 |
if field =~ /^cf_(\d+)$/ |
|
258 |
# custom field |
|
259 |
add_filter field, "=", [expression] |
|
260 |
else |
|
261 |
parms = expression.scan(/^(o|c|!\*|!|\*)?(.*)$/).first |
|
262 |
add_filter field, (parms[0] || "="), [parms[1] || ""] |
|
263 |
end |
|
259 | 264 |
end |
260 | 265 | |
261 | 266 |
# Add multiple filters using +add_filter+ |