Closed chrislockwood closed 3 years ago
Here is example - concatenation subject and value of one custom field as caption in sql_field:
select subject ||coalesce(c1.value,'') from issues LEFT JOIN custom_values c1 ON c1.customized_id=issues.id AND c1.custom_field_id=24 where tracker_id = 6 and status_id = 2
for beginning: select subject from issues
or
select name from issue_statuses
For sure I'll have a play with this, opens up some interesting possibilities. Nice work!
SQL field
With the simple SQL field
, you can run a query that will result in a drop-down menu which is shown when that custom field is edited (e.g. project->configure). This is useful to confine the user input to select one value out of an already available dataset somewhere in the Redmine database (not an external database).
SQL seach field
Unfortunately, I really don't understand how the SQL search field
works.
What I've got so far:
?
) as placeholders for parametersp0=
, p1=
, pN=
...)$(...)
to get a DOM object by HTML id thanks to JQuery (short for: document.getElementById(...)
)$('#issue_custom_field_values_31').val()
But here it ends... When selecting a value in one of the other custom fields (id=31), the search is not carried out. Also when I type something in the SQL search field it just acts as a normal string field. What is the purpose of that search field and what do I do wrong perhaps?
This plugin interests me, but I wonder about the specific use case, and how it improves over the standard custom fields. Any chance you can provide examples?