Opened 9 years ago
Last modified 7 years ago
#12523 new enhancement
Field of Table Plugin - Ability to modify field type
Reported by: | Jason | Owned by: | Cauly |
---|---|---|---|
Priority: | normal | Component: | FieldOfTablePlugin |
Severity: | normal | Keywords: | fieldtype |
Cc: | Trac Release: | 1.0 |
Description
I have the Field of Table plugin installed and it looks great. I looked around and didn't find anything about it, and was wondering if there is any way to change the type of each cell in the table. For example, instead of text, if we had a list of users that was a part of the User column, could we set that as a drop down list? See the table below for more of what I'm asking:
User | Hostname | time |
drop down list | text | date/time picker |
Is there anyway to do this? or is it already a feature that I just haven't found yet?
Attachments (0)
Change History (7)
comment:1 follow-up: 7 Changed 9 years ago by
comment:2 Changed 9 years ago by
Similar to how you specify the table_field.value
with a list of column headers you want to use (in my example I used User, Hostname, time), I was thinking of being able to do something similar with a list of usernames to be able to populate the drop down list. In my head I think of it as you specify the initial header names (User, Hostname, time), then for each value created for that you get a new value field for each of those headers: User.value
where you can populate the usernames, then Hostname you get hostname.value = text
and time.value = date/time picker
. Does that make sense? And would something like that be possible?
comment:3 Changed 7 years ago by
Can you let us know whether the plugin AutocompleteUsersPlugin would work for you in this case?
comment:4 Changed 7 years ago by
Keywords: | FieldofTablePlugin Trac removed |
---|
comment:5 Changed 7 years ago by
Sorry for replying so late for this ticket.
Basically this plugin uses a very simple implementation. To support concepts like "field type" needs a full refactoring, which is quite a big effort.
And after refactoring it seems quite easy for me to support a drop down of user&list, but however while it is possible to support AutocompleteUsersPlugin, it's not a good way to include other plugin's javascript variable in this plugin. A better way is to ask AutocompleteUsersPlugin to provide some interface extensibility.
comment:6 Changed 7 years ago by
comment:7 Changed 7 years ago by
Replying to cauly@…:
... however I'm not sure how to get all existing users in trac system.
Available through Environment.get_known_users
. Example: browser:tags/trac-1.2.2/trac/ticket/default_workflow.py@:551#L541.
I'll look at implementing #6444, but you'd still need to add the appropriate class to the column.
Hello jason,
I'm sorry there're no existing feature that supports a drop down list.
It's easy to implement a drop down list with given values but however I'm not sure how to get all existing users in trac system. If you don't need to get trac users in the drop down, maybe I could help you.