Modify

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#8513 closed defect (invalid)

Error in patch?

Reported by: bungybun@… Owned by: cmc
Priority: normal Component: MultiSelectCustomFieldsPatch
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

In query.py shouldn't the change be

+        modes['multi'] = [
+            {'name': _("contains"), 'value': "~"},
+            {'name': _("does not contain"), 'value': "!~"},

and not

+        modes['multi'] = [
+            {'name': _("contains"), 'value': "|"},
+            {'name': _("does not contain"), 'value': "!"},

Attachments (0)

Change History (4)

comment:1 in reply to: ↑ description Changed 3 years ago by josh.applebaum@…

Replying to bungybun@gmail.com:

In query.py shouldn't the change be

+        modes['multi'] = [
+            {'name': _("contains"), 'value': "~"},
+            {'name': _("does not contain"), 'value': "!~"},

and not

+        modes['multi'] = [
+            {'name': _("contains"), 'value': "|"},
+            {'name': _("does not contain"), 'value': "!"},

Have you gotten to test this out with the corrections? Also, how do you install this patch?

comment:2 Changed 2 years ago by cmc

  • Resolution set to invalid
  • Status changed from new to closed

I don't believe this addition is correct. Using a pipe indicates a different mode. Using a tilde would cause the '%' + value + '%' search to be used. Multiselect values should always end in a |, hence '%' + value + '|%' should be the search.

comment:3 Changed 2 years ago by cmc

Seems like this is a different request, but the same confusion found in #9731. Did you convert a normal select into a multi-select? If so, you'd need to append a pipe to all existing values. I'll add instructions on how to do this in the wiki.

comment:4 Changed 2 years ago by bungybun@…

It was for an old client and I no longer have the full code. It's unlikely that the patch failed to get through test with the client, but then that could be just luck (as in the config was established with a trailing pipe).

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from cmc. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.