Coder Social home page Coder Social logo

Comments (4)

apsmir avatar apsmir commented on August 16, 2024

A good idea. I will think about implementation

from custom_field_sql.

jankokert avatar jankokert commented on August 16, 2024

Great! Thanks!

I took a deeper look at your source code. I have no experience with Ruby, but I seems that you derive the sql field from the StringFormat and from List (lib/custom_field_sql/custom_fields/formats/sql.rb line 5 and 11).

To make the value "clickable", there is already a mechanism in Redmine, called "Link values to URL" which is applicable to boolean, date, list, integer and text format fields.
See here: https://www.redmine.org/projects/redmine/wiki/RedmineCustomFields#Link-values-to-URL

So the only thing you need to do is to provide that input field (Link values to URL)
and then pass it to the original field and let Redmine to the rest.

I think you need to add the input field here, don't you?
app/views/custom_fields/formats/_sql.html.erb

Furthermore, you could also pass the "Text formatting" input field to the base class in the same manner.

from custom_field_sql.

jankokert avatar jankokert commented on August 16, 2024

I checked the Redmine database and the field for "Link values to URL" is stored in the column format_store of the table custom_fields.
The field contains multiple lines:

--- 
!ruby/hash:ActiveSupport::HashWithIndifferentAccess
text_formatting: ''
url_pattern: ''

The line with the key url_pattern is relevant for linking the values to an URL.

Hope this helps to implement this. Cheers.

from custom_field_sql.

jankokert avatar jankokert commented on August 16, 2024

Unfortunately, I cannot see any activity on this issue. Are you working on it?
It would be a tremendous benefit for my installation! Thanks in advance!
Also, can you please answer my question in #1 ?

from custom_field_sql.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.