apsmir / custom_field_sql

redmine sql custom field
14 stars 8 forks source link

How to make the first element selected automatically in drop-down list? #16

Open FreejackRus opened 1 year ago

FreejackRus commented 1 year ago

Hi there. I am new in RoR and Redmine, and trying to get through it. As i understood, sql returns the array of results of sql expression. So here is the question : for example, my resultig arrays have only one element in themselves. How to set this one element to be selected automatically? In sql.rb in formats directory i saw def possible_values_options and i understand how it works, but need some guidance with my problem.