silverstripe / silverstripe-admin

Silverstripe Admin Component
BSD 3-Clause "New" or "Revised" License
25 stars 92 forks source link

FIX Allow `convertSearchToArray` to handle repeating elements #1649

Open mikenuguid opened 8 months ago

mikenuguid commented 8 months ago

Description

Manual testing steps

Issues

Pull request checklist

GuySartorelli commented 8 months ago

Hi,

Thank you for the contribution.

I see that you've deleted the PR templte. I've added it back in. Can you please fill in the template, and check all of the boxes that apply? This really helps us get a feel for what state your contribution is in, what it does, and gives us a good starting point to review it.

mikenuguid commented 7 months ago

@GuySartorelli any feedback on this? There's a merge conflict which needs to be resolved too.

GuySartorelli commented 7 months ago

Sorry, I hadn't noticed you had updated the PR description. Can you please add some manual testing steps? It's not clear how I can test this piece of work. Please reply when you've updated it so I know it's ready for me to look at it again.

mikenuguid commented 7 months ago

@GuySartorelli you could use content review report.

GuySartorelli commented 7 months ago

Following those instructions, both before and after the PR I get ?filters%5Btestlistbox%5D%5B%5D=0&filters%5Btestlistbox%5D%5B%5D=1 (i.e. ?filters[testlistbox][]=0&filters[testlistbox][]=1) as the query string - which is correct.

It seems like this is making no change for me. Tested with both firefox and chromium.

Are there any more steps you can provide me to reproduce this from a fresh installation (with or without silverstripe/contentreview added)?

mikenuguid commented 7 months ago

That's different from what I'm getting. Also, the output of that js method (convertSearchToArray) should not contain duplicate keys so the GET params should be filters[testlistbox][]=0,1 (if fix is applied) and filters[testlistbox][]=1 (if not).

GuySartorelli commented 7 months ago

That's different from what I'm getting.

Okay, well... if you can give me sufficiently detailed steps to reproduce both the original problem and the behaviour you're seeing with your PR I'll be happy to review further - but if I can't reproduce the bug nor the results you're seeing with the PR I can't merge this.