Modify

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#12952 closed defect (fixed)

Completing multiple users on custom fields

Reported by: massimo.b@… 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 7 years ago by massimo.b@…

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.

comment:2 Changed 6 years ago by Ryan J Ollos

Owner: changed from Tetsuya Morimoto to Ryan J Ollos
Status: newaccepted

comment:3 Changed 6 years ago by Ryan J Ollos

In 17203:

TracAutocompleteUsersPlugin 0.4.5dev: Allow multi-completion of custom fields

Refs #12952.

comment:4 Changed 6 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

comment:5 Changed 6 years ago by massimo.b@…

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 in reply to:  5 Changed 6 years ago by Ryan J Ollos

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:7 Changed 6 years ago by Ryan J Ollos

In 17204:

TracAutocompleteUsersPlugin 0.4.5dev: Fix failure when TicketModule is the default handler

Refs #12952.

comment:8 Changed 6 years ago by Ryan J Ollos

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 massimo.b@…

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 Changed 6 years ago by Ryan J Ollos

What about redeploying static resources? I recommend:

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 in reply to:  10 Changed 6 years ago by massimo.b@…

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.

Identical. I checked with 'diff' on both files.

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 massimo.b@…

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 Changed 6 years ago by 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.

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 in reply to:  13 Changed 6 years ago by Ryan J Ollos

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:15 Changed 6 years ago by Ryan J Ollos

In 17234:

TracAutocompleteUsersPlugin 0.4.5dev: Fixup user list on POST

Refs #12952.

comment:16 Changed 6 years ago by 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">

comment:17 in reply to:  16 Changed 6 years ago by Ryan J Ollos

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.