Project

General

Profile

value of custom field

Added by Dariel rodriguez about 8 years ago

Hi there

as I can get the value of a custom field before adding the request, this is depending on that value will give priority to the request.

and created after the request if I can with issue.custom_value_for () but not before.

Cheers


Replies (1)

RE: value of custom field - Added by Dariel rodriguez about 8 years ago

I find the solution

 def controller_issues_new_before_save(context)    
      save_expiration_date(context[:issue])
    end

save_expiration_date(issue)
issue.custom_field_values.each do |cfv|
       if cfv.custom_field.name == name              
         categoria=cfv.value

      elsif cfv.custom_field.name == name
         subcategoria=cfv.value

       elsif cfv.custom_field.name == name
         texto=cfv.value
        end
      end 
end

I hope to serve my question and my answer

    (1-1/1)