I am creating report with multiple parameters. A half is single checkboxes for parameter grouping. If I put checkbox parameter default value to 1, then when the report loads, other multiselect parameters which are below this checkbox in the parameter form are also defaulted to value 1(if they have value with 1). If I use default checkbox parameter for last one in tags then this problem does not occur.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

janeks created an issue. See original summary.

metzlerd’s picture

I don't really understand what is being said here. Please include a report sample that demonstrates the problem.

janeks’s picture

See Frx file in attached zip file.
Look for parameter group_by_id_code. It has default parameter value: 1
No other params has.
Now if we call this report the data block is constructed correctly, but if we now look into parameter form then all parameters with lists that follows parameter group_by_id_code and has in their list a value 1 is also selected.

metzlerd’s picture

FileSize
378 bytes

I was able to reproduce this bug. Here is a patch.

metzlerd’s picture

Status: Active » Needs review
metzlerd’s picture

FileSize
476 bytes

Here's a slight revision that's more inline with the way things are in d8.

janeks’s picture

Status: Needs review » Closed (fixed)

Thank you - the patch fixed the problem.

metzlerd’s picture

Status: Closed (fixed) » Reviewed & tested by the community

Proper stting is reviewed and tested by community... I haven't committed the patch, so it isn't closed yet. Also is generally better to moved to fixed rather than closed(fixed) because it lets me see activity in the queue prior to closing (they move to closed automatically after two weeks of sitting at fixed.)

metzlerd’s picture

Status: Reviewed & tested by the community » Fixed

This has been committed and pushed... not sure why the commit messages aren't showing up here.

  • metzlerd committed a2f45fb on 7.x-4.x
    Issue #2737087 by metzlerd: Bug for default parameter value
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.