Download & Extend

Option field in Views filters is unused

Project:Forward
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

The option field in the forward_count and clickthrough_count Forward Views filters is thrown away by the filter code, as option fields have to be handled in a custom handler and both of those use the default handler.

If there is a purpose for the option field (which effectively makes a second input field), a custom handler should be written (and the purpose should be specified in the filter text). But it would seem like the only purpose is as the filter value itself; this is reinforced by the fact that the 'value' array key (a required field as per the API) is missing.

Patch enclosed. It is based on the above assumption, and specifies 'value'->'integer', and removes the option fields. If instead there was a purpose for having two input fields (the required value field as well as the option field), that should be added to the filter text and a custom handler should be created for it instead of using this patch.

AttachmentSize
forward.module.HEAD_.filtervalue.r0.patch951 bytes

Comments

#1

Status:active» needs review

Boy, I'm on a cold streak. That's twice in a row I forget to mark as patch enclosed.

#2

Version:5.x-1.x-dev» 7.x-1.x-dev

Re-rolled against current HEAD.

It's a simple patch. Been running with it for months.

AttachmentSize
forward.module.HEAD_.filtervalue.r1.patch 953 bytes

#3

Status:needs review» closed (won't fix)
nobody click here