Roundup Tracker - Issues

Issue 2550683

classification
Allow indexargs_form filter variable exclusion
Type: behavior Severity: minor
Components: Infrastructure, Interface Versions: 1.4
process
Status: closed fixed
:
: rouilj : bruce, rouilj
Priority: normal : patch

Created on 2010-11-14 11:25 by bruce, last changed 2016-06-11 23:18 by rouilj.

Files
File name Uploaded Description Edit Remove
indexargs_form.patch bruce, 2010-11-14 11:25
Messages
msg4207 Author: [hidden] (bruce) Date: 2010-11-14 11:25
This is a request for a minor backward compatible change to the API and 
behaviour of indexargs_form (with the addition of one optional argument).

I have trackers where the index is filtered on form and session variables
which are maintained dynamically and independently of indexargs_form. For
this to work one must exclude all variables from the indexargs_form call
which are to be replaced with values that are derived from these other
variables, otherwise they will clash with the "hidden" form elements 
(which are automatically generated by indexargs_form itself).

The attached three line patch (against 1.4.16) implements this behaviour
by adding one extra argument (exclude) to indexargs_form. It is backward
compatible with the existing code and breaks nothing AFAIK.

This is an example of usage:

  <tal:block replace="structure python:request.indexargs_form(
                      sort=0,group=0,filter=0,columns=0,
                      exclude=['type','status','assignedto'])"/>

where the variables "type", "status" and "assignedto" are supplied via other
(visible) form input elements. Without the new exclude argument to indexargs_form,
all hidden input elements otherwise generated by this call would need to be 
manually added to the template code. Further, given that the template may not
know what other variables may be (dynamically) defined it may not even be 
possible to code this without some python helpers.

Does anyone have any objections to this behaviour being included in roundup?
msg4745 Author: [hidden] (rouilj) Date: 2013-01-11 03:40
I can see this being a useful patch and as stated it looks
backwards compatible.

What needs to be done to prep this for inclusion?

I guess a doc change for indexargs_form but that's all I see.

Does anybody have any other issues before I apply this?
msg5595 Author: [hidden] (rouilj) Date: 2016-06-11 23:18
Checked in c1f1465d5303

I added a few doc elements.
History
Date User Action Args
2016-06-11 23:18:53rouiljsetpriority: normal
assignee: rouilj
status: new -> closed
messages: + msg5595
resolution: fixed
2013-01-11 03:40:22rouiljsetnosy: + rouilj
messages: + msg4745
2010-11-14 11:25:25brucecreate