Project

General

Profile

Redmine Custom Auto-Complete - HowTo

Added by Manieq K almost 6 years ago

Hello
I would like to ask about the operation of the Redmine Custom Auto-Complete plugin
I installed it but I can not find anywhere where it gets the data to auto compete.
Does anyone know how it works?


Replies (2)

RE: Redmine Custom Auto-Complete - HowTo - Added by Mayama Takeshi almost 6 years ago

Hi, it does a db query, just look at the code:

@issues = Issue.find_by_sql(["select max(issues.id) as id, custom_values.value as value, count(*) as count from custom_values, issues where custom_values.customized_id = issues.id and custom_values.custom_field_id = ? and lower(custom_values.value) like lower(?) group by custom_values.value order by max(issues.updated_on) desc", params[:custom_field_id], "%#{params[:term]}%"])

https://github.com/taikii/redmine_custom_auto_complete/blob/master/app/controllers/custom_auto_complete_controller.rb

RE: Redmine Custom Auto-Complete - HowTo - Added by Manieq K almost 6 years ago

Now I noticed that it works in the default field "parent task". But how does it work in any custom field?
I create custom field as Text but it not find anything.

    (1-2/2)