Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter with default configuration is not applied if the link was opened in a new browser tab #4018

Closed
trx0eth7 opened this issue Dec 20, 2024 · 5 comments
Assignees
Milestone

Comments

@trx0eth7
Copy link

trx0eth7 commented Dec 20, 2024

Environment

Jmix version: 2.4.2

Bug Description

If you share a link that contains filter values, the values ​​are reset and the filter is not applied
E.g. http://localhost:8080/users?genericFilterCondition=property:username_contains_vasilev

Steps To Reproduce

  1. Create demo project
  2. Change filter in user-list-view.xml like this
    <genericFilter id="genericFilter"
                       dataLoader="usersDl">
            <properties include=".*"/>
            <configurations>

                <configuration id="defaultConfiguration"
                               name="Admin"
                               default="true">
                    <jpqlFilter id="defaultConfigurationFilterCondition"
                                label="Admin"
                                parameterClass="java.lang.Void"
                                visible="false"
                                defaultValue="true">
                        <condition>
                            <c:jpql>
                                <c:where>{E}.username = 'admin'</c:where>
                            </c:jpql>
                        </condition>
                    </jpqlFilter>
                </configuration>
            </configurations>
        </genericFilter>
  1. Run application
  2. Open users view
  3. Create new user (e.g. username = 'vasilev')
  4. Click on dropdown button in filter and select "Reset filter" value
  5. Add condition to generic filter (e.g. use 'username' property contains 'vasilev' value)
  6. Copy url and open new tab in browser (http://localhost:8080/users?genericFilterCondition=property:username_contains_vasilev)

AR:
url doesn't contain value in filter, list of user wasn't filtered in view

http://localhost:8080/users?genericFilterCondition=property:username_contains_

ER:
url contains filter with value, list of user was filtered in view

http://localhost:8080/users?genericFilterCondition=property:username_contains_vasilev

@trx0eth7 trx0eth7 added triage Issue is waiting for triage type: bug Something isn't working labels Dec 20, 2024
@trx0eth7
Copy link
Author

sorry guys, this bug is specific to our project

@trx0eth7
Copy link
Author

can't reproduce in demo project

@glebfox glebfox closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
@glebfox glebfox added state: can't reproduce Cannot reproduce the problem and removed triage Issue is waiting for triage labels Dec 20, 2024
@trx0eth7
Copy link
Author

@glebfox I was able to reproduce it, the thing is that it was necessary to create a default configuration for generic filter. I think it's somehow connected with issue: #3520

@trx0eth7 trx0eth7 changed the title Filter is not applied if the link was opened in a new browser tab Filter with default configuration is not applied if the link was opened in a new browser tab Dec 20, 2024
@glebfox glebfox reopened this Dec 20, 2024
@glebfox glebfox added in: flowui triage Issue is waiting for triage size: M and removed state: can't reproduce Cannot reproduce the problem triage Issue is waiting for triage labels Dec 20, 2024
@glebfox glebfox moved this to Backlog in Release 2.4 Jan 10, 2025
@KremnevDmitry KremnevDmitry moved this from Backlog to Next in Release 2.4 Jan 13, 2025
@KremnevDmitry KremnevDmitry moved this from Next to In progress in Release 2.4 Jan 13, 2025
KremnevDmitry added a commit that referenced this issue Jan 13, 2025
KremnevDmitry added a commit that referenced this issue Jan 13, 2025
…ed in a new browser tab #4018

(cherry picked from commit 391d077)
@KremnevDmitry
Copy link
Contributor

For QA

It is necessary to double-check the case from the #3520 too
Also, it is necessary to check the general functionality of the GenericFilter component (test cases)

@KremnevDmitry KremnevDmitry moved this from In progress to QA in Release 2.4 Jan 13, 2025
@SergeiAksenov2
Copy link

Tested on:
Jmix version: 2.4.999-SNAPSHOT
Jmix Studio plugin version: 2.4.SNAPSHOT7098-243
IntelliJ version: IntelliJ IDEA 2024.3.1 (Community Edition)

@github-project-automation github-project-automation bot moved this from QA to Done in Release 2.4 Jan 14, 2025
KremnevDmitry added a commit that referenced this issue Jan 14, 2025
KremnevDmitry added a commit that referenced this issue Jan 14, 2025
…ed in a new browser tab #4018

(cherry picked from commit 5b5b709)
@Gavrilov-Ivan Gavrilov-Ivan added this to the 2.4.3 milestone Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

5 participants