#12952 closed defect (fixed)
Completing multiple users on custom fields
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | AutocompleteUsersPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
Please add support to complete multiple users for custom fields just like the Cc field does. The first users in Cc is completed like "Foo, " providing the possibility to add more users.
But doing the same for
[autocomplete] fields = testers [ticket-custom] testers = text testers.label = Testers testers.order = 41 testers.value =
only completes the first user. Adding ", " manually doesn't complete any more users.
Attachments (0)
Change History (17)
comment:1 Changed 8 years ago by
comment:2 Changed 6 years ago by
Owner: | changed from Tetsuya Morimoto to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:4 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:5 follow-up: 6 Changed 6 years ago by
Completion is completely broken, I see the moving circle but no users are completed at all. The new plugin was built and loaded successfully.
comment:6 Changed 6 years ago by
Replying to massimo.b@…:
Completion is completely broken, I see the moving circle but no users are completed at all.
Did you clear your browser cache? At least do a hard refresh of the page.
comment:8 Changed 6 years ago by
Unrelated to the changes in this ticket, but did find another issue (r17204) that led to "moving circle but no users completed".
comment:9 Changed 6 years ago by
No, still does not work. I cleared the browser cache, I did a hard refresh several times. We also tried on different clients and different browsers here. I deleted all temporary ~/.python-eggs/* .
We found out, that modifying an existing ticket has still a working completion on the users. Although the multiple completion which this ticket is about isn't working yet. The Cc completes every user with pending ',' and is able to complete the next user, but the custom fields still only complete the first one.
For new tickets neither Cc nor the custom fields can complete the user.
comment:10 follow-up: 11 Changed 6 years ago by
What about redeploying static resources? I recommend:
- Checking the JavaScript file linked from the page source against autocomplete_ticket.js.
- Checking the browser console.
Did you update your config (see changes linked in comment:4)?
Could also be a plugin conflict. Or maybe you are using a jQuery version other than the one Trac provides. For example, Debian ships a newer jQuery version.
You'll have to find some clues as to what the problem is because it works fine with Trac 1.0-stable and Trac 1.2-stable with no other plugins installed.
comment:11 Changed 6 years ago by
Replying to Ryan J Ollos:
What about redeploying static resources?
Thanks that solved it. New tickets have autocompleting for users now. But the issue is still the same that custom fields don't autocomplete multiple users.
- Checking the JavaScript file linked from the page source against autocomplete_ticket.js.
Identical. I checked with 'diff' on both files.
- Checking the browser console.
Only successful GETs.
Did you update your config (see changes linked in comment:4)?
Working now. Thank you very much!
comment:12 Changed 6 years ago by
There is something wrong with the completion. After adding users to a custom field, the user are not hyperlinked after submit. The ticket shows the short form of all users, while Cc and Reported by is using the full name of the users and hyperlinked.
More serious issue is that all the custom searches like "Developer is $user" are not working anymore.
comment:13 follow-up: 14 Changed 6 years ago by
I have to correct my last comment: We had custom queries with = operator that don't work anymore as even with only one user in a custom field, a "," character is added. We need to adapt all custom searches with the "contains" operator.
By the way the documentation in https://trac-hacks.org/wiki/TracQuery says the operator is ~= which did not work, only =~ is working here.
So the plugin is working correct. Isn't it possible to have a real user type custom field instead of text type, to get the same behaviour with hyperlinking and full name resolution like the Cc field?
comment:14 Changed 6 years ago by
Replying to massimo.b@…:
I have to correct my last comment: We had custom queries with = operator that don't work anymore as even with only one user in a custom field, a "," character is added. We need to adapt all custom searches with the "contains" operator.
I will modify the plugin to strip the trailing comma.
By the way the documentation in https://trac-hacks.org/wiki/TracQuery says the operator is ~= which did not work, only =~ is working here.
I recall someone raising the issue in the past, but I don't recall where the discussion led. I suggest asking on trac-users.
So the plugin is working correct. Isn't it possible to have a real user type custom field instead of text type, to get the same behaviour with hyperlinking and full name resolution like the Cc field?
It is possible, but it will be more work. See trac:#8069. It's fairly high on my priority list, but not sure when I'll get to it.
comment:16 follow-up: 17 Changed 6 years ago by
Thank you. One thing I noticed especially on this plugin: Users always need to hard refresh (CTRL+F5) or delete their browser cache to get the updated version. I'm no expert in all the "Expires" and "Cache-Control: max-age", why does that happen? You could add some postfix like this to force a reload:
<link href="style.css?v=17234">
comment:17 Changed 6 years ago by
Replying to massimo.b@…:
Thank you. One thing I noticed especially on this plugin: Users always need to hard refresh (CTRL+F5) or delete their browser cache to get the updated version. I'm no expert in all the "Expires" and "Cache-Control: max-age", why does that happen? You could add some postfix like this to force a reload:
<link href="style.css?v=17234">
See trac:#9936.
Currently the AutocompleteUsersPlugin cannot complete more than one user entry.
Please also add a completion type like MultiSelectFieldPlugin that can select and deselect from the user list.