apsmir / custom_field_sql Goto Github PK
View Code? Open in Web Editor NEWredmine sql custom field
redmine sql custom field
This plugin offers some great new possibilities! E.g. creating drop-down lists with values from other database tables.
Unfortunately, the output of the label will not be rendered as HTML.
Consider the case, where I want to create a dropdown menu of all DMS files and then generate a clickable link to the document.
my query is:
select name as value, CONCAT('<a href="http://172.16.32.41/dmsf/files/', id, '/view">', name, '</a>') as label from dmsf_files
Result:
The HTML anchor tag is not rendered.
Could you please add an option for this?
Thanks for this plugin.
How can I use this feature like a SELECT2 style?
My Select command returned more than 1000 records.
It is hard to find correct record. Is it possible to search correct record by typing some letters in field?
Best Regards
format Sql -> sql request
select subject from issues where id=%id%
in production.log
ctionView::Template::Error (undefined method `id' for #<Array:0x000001254dd24a10>):
196: <% custom_fields.each do |custom_field| %>
197: <p>
198: <label><%= custom_field.name %></label>
199: <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
200: </p>
201: <% if i == split_on %>
202: </div><div class="splitcontentright">
I have the same problem tat #15
Do you have a workaround for solve the problem?
The problem its with thw sql fielt type but not with the sql search type.
Thankyou in advance and thank you for the very good plugin.
Regards
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?
Hi @apsmir,
First: Thanks for your good work.
When trying out the plugin, I encountered installation problems when using a Redmine Docker environment.
Steps to reproduce:
/opt/redmine/data/redmine/plugins$ git clone https://github.com/apsmir/custom_field_sql.git
/opt/redmine$ docker-compose up
Output:
...
redmine_1 | rake aborted!
redmine_1 | LoadError: cannot load such file -- custom_field_sql/custom_fields/formats/sql
redmine_1 | /usr/local/bundle/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
redmine_1 | /usr/local/bundle/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
redmine_1 | /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
redmine_1 | /usr/src/redmine/plugins/custom_field_sql/init.rb:2:in `block in <top (required)>'
redmine_1 | /usr/src/redmine/lib/redmine/plugin.rb:96:in `instance_eval'
redmine_1 | /usr/src/redmine/lib/redmine/plugin.rb:96:in `register'
redmine_1 | /usr/src/redmine/plugins/custom_field_sql/init.rb:1:in `<top (required)>'
redmine_1 | /usr/src/redmine/lib/redmine/plugin_loader.rb:31:in `load'
redmine_1 | /usr/src/redmine/lib/redmine/plugin_loader.rb:31:in `run_initializer'
redmine_1 | /usr/src/redmine/lib/redmine/plugin_loader.rb:108:in `each'
redmine_1 | /usr/src/redmine/lib/redmine/plugin_loader.rb:108:in `block in load'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:427:in `instance_exec'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:427:in `block in make_lambda'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:603:in `catch'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:603:in `block in default_terminator'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:199:in `block in halting'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `block in invoke_before'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `each'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `invoke_before'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:105:in `run_callbacks'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/reloader.rb:88:in `prepare!'
redmine_1 | /usr/local/bundle/gems/railties-6.1.6/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
redmine_1 | /usr/local/bundle/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `instance_exec'
redmine_1 | /usr/local/bundle/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `run'
redmine_1 | /usr/local/bundle/gems/railties-6.1.6/lib/rails/initializable.rb:61:in `block in run_initializers'
redmine_1 | /usr/local/bundle/gems/railties-6.1.6/lib/rails/initializable.rb:60:in `run_initializers'
redmine_1 | /usr/local/bundle/gems/railties-6.1.6/lib/rails/application.rb:391:in `initialize!'
redmine_1 | /usr/src/redmine/config/environment.rb:16:in `<top (required)>'
redmine_1 | /usr/local/bundle/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
redmine_1 | /usr/local/bundle/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
redmine_1 | /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `block in require'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:299:in `load_dependency'
redmine_1 | /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `require'
redmine_1 | /usr/local/bundle/gems/railties-6.1.6/lib/rails/application.rb:367:in `require_environment!'
redmine_1 | /usr/local/bundle/gems/railties-6.1.6/lib/rails/application.rb:533:in `block in run_tasks_blocks'
redmine_1 | Tasks: TOP => db:migrate => db:load_config => environment
redmine_1 | (See full trace by running task with --trace)
Fix working for me:
/opt/redmine/data/redmine/plugins/custom_field_sql# git diff HEAD
diff --git a/init.rb b/init.rb
index 952841b..aeffaaf 100644
--- a/init.rb
+++ b/init.rb
@@ -1,6 +1,6 @@
Redmine::Plugin.register :custom_field_sql do
- require 'custom_field_sql/custom_fields/formats/sql'
- require 'custom_sql_search_hook'
+ require File.expand_path('../lib/custom_field_sql/custom_fields/formats/sql', __FILE__)
+ require File.expand_path('../lib/custom_sql_search_hook', __FILE__)
name 'Redmine SQL Custom Field Label plugin'
author 'Alexey Smirnov'
description 'This is a plugin for Redmine which adds SQL type to Custom Fields'
diff --git a/lib/custom_sql_search_hook.rb b/lib/custom_sql_search_hook.rb
index 0456bfb..1287824 100644
--- a/lib/custom_sql_search_hook.rb
+++ b/lib/custom_sql_search_hook.rb
@@ -1,4 +1,4 @@
-class CustomSqlSearchHookListener < Redmine::Hook::ViewListener
+class CustomSqlSearchHook < Redmine::Hook::ViewListener
def view_layouts_base_html_head(context={})
html = "\n<!-- [custom field sql plugin] -->\n"
Hello,
thank you for your great work.
Consider adding this code in sql.rb
in formats
directory:
if object.issue_id.nil?
sql = sql.gsub('%issue_id%', 'null')
else
sql = sql.gsub('%issue_id%', object.issue_id.to_s)
end
It's very useful to fill dropdown with specific values in Time Tracking Entries.
S.
Hello, I am searching for a way to get data from an external MS SQL database. Is it possible to add this feature?
From what I can tell this plugin only allows to send queries to the redmine database, would it be possible to instead get results from a different database with different IP?
Hello,
I'm getting the following error when installing the plugin. Can anyone advise? Redmine 5
redmine@ibcopenproject:$ cd plugins//plugins$ git clone https://github.com/apsmir/custom_field_sql.git
redmine@ibcopenproject:
Cloning into 'custom_field_sql'...
remote: Enumerating objects: 256, done.
remote: Counting objects: 100% (256/256), done.
remote: Compressing objects: 100% (116/116), done.
remote: Total 256 (delta 79), reused 219 (delta 60), pack-reused 0
Receiving objects: 100% (256/256), 27.41 KiB | 400.00 KiB/s, done.
Resolving deltas: 100% (79/79), done.
redmine@ibcopenproject:/plugins$ cd ..$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production --trace
redmine@ibcopenproject:
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
LoadError: cannot load such file -- custom_field_sql/custom_fields/formats/sql
/var/lib/gems/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/lib/gems/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in
require'
/var/lib/gems/3.0.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:in require' /opt/redmine/plugins/custom_field_sql/init.rb:2:in
block in <top (required)>'
/opt/redmine/lib/redmine/plugin.rb:96:in instance_eval' /opt/redmine/lib/redmine/plugin.rb:96:in
register'
/opt/redmine/plugins/custom_field_sql/init.rb:1:in <top (required)>' /opt/redmine/lib/redmine/plugin_loader.rb:31:in
load'
/opt/redmine/lib/redmine/plugin_loader.rb:31:in run_initializer' /opt/redmine/lib/redmine/plugin_loader.rb:108:in
each'
/opt/redmine/lib/redmine/plugin_loader.rb:108:in block in load' /var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:427:in
instance_exec'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:427:in block in make_lambda' /var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:198:in
block (2 levels) in halting'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:604:in block (2 levels) in default_terminator' /var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:603:in
catch'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:603:in block in default_terminator' /var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:199:in
block in halting'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:512:in block in invoke_before' /var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:512:in
each'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:512:in invoke_before' /var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:105:in
run_callbacks'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/reloader.rb:88:in prepare!' /var/lib/gems/3.0.0/gems/railties-6.1.7.2/lib/rails/application/finisher.rb:124:in
block in module:Finisher'
/var/lib/gems/3.0.0/gems/railties-6.1.7.2/lib/rails/initializable.rb:32:in instance_exec' /var/lib/gems/3.0.0/gems/railties-6.1.7.2/lib/rails/initializable.rb:32:in
run'
/var/lib/gems/3.0.0/gems/railties-6.1.7.2/lib/rails/initializable.rb:61:in block in run_initializers' /usr/lib/ruby/3.0.0/tsort.rb:228:in
block in tsort_each'
/usr/lib/ruby/3.0.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' /usr/lib/ruby/3.0.0/tsort.rb:431:in
each_strongly_connected_component_from'
/usr/lib/ruby/3.0.0/tsort.rb:349:in block in each_strongly_connected_component' /usr/lib/ruby/3.0.0/tsort.rb:347:in
each'
/usr/lib/ruby/3.0.0/tsort.rb:347:in call' /usr/lib/ruby/3.0.0/tsort.rb:347:in
each_strongly_connected_component'
/usr/lib/ruby/3.0.0/tsort.rb:226:in tsort_each' /usr/lib/ruby/3.0.0/tsort.rb:205:in
tsort_each'
/var/lib/gems/3.0.0/gems/railties-6.1.7.2/lib/rails/initializable.rb:60:in run_initializers' /var/lib/gems/3.0.0/gems/railties-6.1.7.2/lib/rails/application.rb:391:in
initialize!'
/opt/redmine/config/environment.rb:16:in <top (required)>' /var/lib/gems/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in
require'
/var/lib/gems/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/lib/gems/3.0.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:in
require'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:332:in block in require' /var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:299:in
load_dependency'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:332:in require' /var/lib/gems/3.0.0/gems/railties-6.1.7.2/lib/rails/application.rb:367:in
require_environment!'
/var/lib/gems/3.0.0/gems/railties-6.1.7.2/lib/rails/application.rb:533:in block in run_tasks_blocks' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:281:in
block in execute'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:281:in each' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:281:in
execute'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:219:in block in invoke_with_call_chain' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:199:in
synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:243:in
block in invoke_prerequisites'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:241:in each' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:241:in
invoke_prerequisites'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:218:in block in invoke_with_call_chain' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:199:in
synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:188:in
invoke'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:160:in invoke_task' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:116:in
block (2 levels) in top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:116:in each' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:116:in
block in top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:125:in run_with_threads' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:110:in
top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:83:in block in run' /usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:186:in
standard_exception_handling'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:80:in run' /opt/redmine/bin/rake:4:in
<top (required)>'
/var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in load' /var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in
kernel_load'
/var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:23:in run' /var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/cli.rb:492:in
exec'
/var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' /var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in
invoke_command'
/var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' /var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/cli.rb:34:in
dispatch'
/var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' /var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/cli.rb:28:in
start'
/var/lib/gems/3.0.0/gems/bundler-2.4.13/exe/bundle:45:in block in <top (required)>' /var/lib/gems/3.0.0/gems/bundler-2.4.13/lib/bundler/friendly_errors.rb:117:in
with_friendly_errors'
/var/lib/gems/3.0.0/gems/bundler-2.4.13/exe/bundle:33:in <top (required)>' /opt/redmine/bin/bundle:4:in
load'
/opt/redmine/bin/bundle:4:in `
Hi, In the case when sql query have 2 or more columns field have just first column (ok), but it does not work correctly - the value change (especially when second column in few rows are null).
As i wrote at redmine.org - useful plugin.
Regards,
KI
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.
Let's say SQL expression: select subject from issues where id=%id%
If the issue exists, EDIT ISSUE is OK.
If create a new issue, it's Internal error
ActionView::Template::Error (Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1: select subject from issues where id=):
19: <% i = 0 %>
20: <% split_on = (lr_values.size / 2.0).ceil - 1 %>
21: <% lr_values.each do |value| %>
22:<%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %>
23: <% if i == split_on %>
24:
25: <% end %>plugins/custom_field_sql/lib/custom_field_sql/custom_fields/formats/sql.rb:15:in
possible_values_options' lib/redmine/field_format.rb:162:in
possible_custom_value_options'
lib/redmine/field_format.rb:613:inselect_edit_tag' lib/redmine/field_format.rb:578:in
edit_tag'
app/helpers/custom_fields_helper.rb:91:incustom_field_tag' app/helpers/custom_fields_helper.rb:120:in
custom_field_tag_with_label'
app/views/issues/_form_custom_fields.html.erb:22:inblock (2 levels) in _9a8a4f882f5988e4bc110ca6763fd21b' app/views/issues/_form_custom_fields.html.erb:21:in
each'
app/views/issues/_form_custom_fields.html.erb:21:inblock in _9a8a4f882f5988e4bc110ca6763fd21b' app/views/issues/_form_custom_fields.html.erb:1:in
each'
app/views/issues/_form_custom_fields.html.erb:1:in_9a8a4f882f5988e4bc110ca6763fd21b' app/views/issues/_attributes.html.erb:83:in
block in _31d901be448779fb8bcc513422c492e7'
app/helpers/application_helper.rb:1365:inlabelled_fields_for' app/views/issues/_attributes.html.erb:1:in
_31d901be448779fb8bcc513422c492e7'
app/views/issues/_form.html.erb:50:inblock in _80d472f4a750771d2125048d87bbdde3' app/helpers/application_helper.rb:1365:in
labelled_fields_for'
app/views/issues/_form.html.erb:1:in_80d472f4a750771d2125048d87bbdde3' app/views/issues/new.html.erb:13:in
block in _e80235d30eb35dd73c2a3f21753346e8'
app/helpers/application_helper.rb:1358:inlabelled_form_for' app/views/issues/new.html.erb:5:in
_e80235d30eb35dd73c2a3f21753346e8'
app/controllers/issues_controller.rb:122:inblock (2 levels) in new' app/controllers/issues_controller.rb:121:in
new'
Great work on this plugin. It looks like it will solve a lot of problems.
Can you give some guidance about how to set up connection to query external databases? I need to connect to an Oracle DB to extract info, and the format is not obvious.
Thanks!
Query:
select subject ||' ('||coalesce(c1.value,'')||')' from issues
LEFT JOIN custom_values c1 ON c1.customized_id=issues.id AND c1.custom_field_id=21
where tracker_id = 9 and status_id = 2
select '---- User beafore ----'
union all
union all
select distinct c2.value from custom_values c2 where c2.custom_field_id=31
and c2.value not in (
select subject ||' ('||coalesce(c1.value,'')||')' from issues
LEFT JOIN custom_values c1 ON c1.customized_id=issues.id AND c1.custom_field_id=21
where tracker_id = 9 and status_id = 2)
;
Give exception:
<field_name> cannot be blank.
No results are displayed.
your plugin so nice
but we need more example with pics to know more about this plugin
and im try to install it in redmine 5.0.2 ruby 3.1.2
redmine@redmine:~/5.0.2$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
LoadError: cannot load such file -- custom_field_sql/custom_fields/formats/sql
/home/redmine/5.0.2/plugins/custom_field_sql/init.rb:2:in `block in <top (required)>'
/home/redmine/5.0.2/lib/redmine/plugin.rb:96:in `instance_eval'
/home/redmine/5.0.2/lib/redmine/plugin.rb:96:in `register'
/home/redmine/5.0.2/plugins/custom_field_sql/init.rb:1:in `<top (required)>'
/home/redmine/5.0.2/lib/redmine/plugin_loader.rb:31:in `load'
/home/redmine/5.0.2/lib/redmine/plugin_loader.rb:31:in `run_initializer'
/home/redmine/5.0.2/lib/redmine/plugin_loader.rb:108:in `each'
/home/redmine/5.0.2/lib/redmine/plugin_loader.rb:108:in `block in load'
/home/redmine/5.0.2/config/environment.rb:16:in `<top (required)>'
/home/redmine/.rbenv/versions/3.1.2/bin/bundle:25:in `load'
/home/redmine/.rbenv/versions/3.1.2/bin/bundle:25:in `<main>'
Tasks: TOP => redmine:plugins:migrate => envir
```onment
(See full trace by running task with --trace)
I get an error if I try to use a variable in a request.
@id=%id%
select subject from issues where id=@id
ActionView::Template::Error (Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@id=1331
select subject from issues where id=@id' at line 1: @id=1331
select subject from issues where id=@id):
8: <% i = 0 %>
9: <% split_on = (custom_field_values.size / 2.0).ceil - 1 %>
10: <% custom_field_values.each do |value| %>
11: <p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
12: <% if i == split_on -%>
13: </div><div class="splitcontentright">
14: <% end -%>
How can variables be used?
Hi, when i use it and add a new sql custom_field to issues, I get an error because the issue object does not have an issue_id
Its possible solve it?
Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.