Currently if we create a site settings with multiple boolean fields A and B. The site settings loader returns both the values only if the both the values are set to true. We are unable to fetch the value of the filed if its value is set to false.

Site settings array if only one value is set to true.

Array
(
    [site_settings] => 1
)

Site settings array if both value are set.

Array
(
    [site_settings] => Array
        (
            [field_A] => 1
            [field_B] => 1
        )

)

Idea is to get an output as if field B is not set

Array
(
    [site_settings] => Array
        (
            [field_A] => 1
            [field_B] => 0
        )

)

Comments

pritish.kumar created an issue. See original summary.

pritishkumar’s picture

Version: 8.x-1.x-dev » 8.x-1.16
Assigned: pritishkumar » Unassigned
pritishkumar’s picture

StatusFileSize
new625 bytes

The patch allows boolean field values to be available in above stated format.

scott_euser’s picture

Status: Active » Needs review

Thanks! Setting to needs review so tests run.

scott_euser’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new8.43 KB
new6.04 KB

Thanks, this looks good to me - adding test coverage.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: 3092887-5.patch, failed testing. View results

scott_euser’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new670 bytes
new8.79 KB

Updated test with new fieldset.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: 3092887-7.patch, failed testing. View results

scott_euser’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new9.61 KB
new760 bytes

  • scott_euser committed ece642d on 8.x-1.x
    Issue #3092887 by scott_euser, pritish.kumar: Allow Multiple Boolean...
scott_euser’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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