Comments (3)
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
from custom_field_sql.
For sure I'll have a play with this, opens up some interesting possibilities. Nice work!
from custom_field_sql.
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:
- In your query, you can insert one or me question marks (
?
) as placeholders for parameters - In the parameter section, every line defines one parameter
- The line always starts with
p0=
,p1=
,pN=
...) - In every line, a javascript command is assigned to the parameter
- We can use
$(...)
to get a DOM object by HTML id thanks to JQuery (short for:document.getElementById(...)
) - By the DOM id we can get access to the content of other custom fields in the editing dialog, e.g.
$('#issue_custom_field_values_31').val()
- The DOM id can be retrieved in Firefox by right-clicking on a custom field and then choose to inspect / untersuchen
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?
from custom_field_sql.
Related Issues (20)
- How to use this feature like a SELECT2 style? HOT 3
- Configuration for external DB?
- rake aborted! when installing plugin using redmine docker HOT 2
- %issue_id% parameter for sql HOT 1
- examples with pics HOT 2
- Field dont show values on issues filter HOT 1
- How to make the first element selected automatically in drop-down list?
- Error when installing plugin HOT 4
- Field dont show values on issues filter --Me too HOT 4
- Hover fields in redmine turn red
- More then one column in select statement HOT 3
- custom_field_sql dont show values on issues filter %issue_id%
- Exception during filtering HOT 2
- New Issue page cannot use %id%
- Enable "Link values to URL" and "Text formatting" HOT 4
- Create custom connection to a different DB
- [Feature] query an external DB HOT 2
- Error if I try to use a variable in a request
- Error when bulk editing issues HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom_field_sql.