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

NEW Update working chkbxlst filter for lists #9897

Merged
merged 3 commits into from
Dec 14, 2018
Merged

NEW Update working chkbxlst filter for lists #9897

merged 3 commits into from
Dec 14, 2018

Conversation

Vaadasch
Copy link
Contributor

@Vaadasch Vaadasch commented Oct 27, 2018

Sorry, I don't know if it is a already requested feature or if it's know as a bug or else...

I've made working the filters for the "Checkboxes from a list" extrafields.

I believe i've adequatly removed the multiples possibilities of using $ID$ :

In the order :

  • using of "table.col=$ID$ inside parenthesis with whatever AND and OR formula" replaced by "table.col=$ID$"
    -- ex : "( foo = bar AND table.col=$ID$)"
    -- replaced by : "table.col=$ID$"
  • using of "table.filter=($SEL$...col=$ID$...)" replaced by "table.col=$ID$"
    -- ex : "fk_soc = ($SEL$ fk_soc FROM llx_facture WHERE rowid = $ID$)"
    -- replaced by : rowid = $ID$

These two firsts are iterated until there is no more replacement possible

  • using of "table.col=$ID$" replaced by 1 if surrounded by "AND" or nothing, replaced by 0 if surrounded by "OR"
    -- ex : foo = bar AND table.col=$ID$
    -- replaced by : foo = bar AND 1

Hopefully, no one would use smth like that without parenthesis :
foo = bar AND table.col=$ID$ OR foo2 = bar2

That code permit to factorize every utilisation of AND, OR, (SELECT...), JOIN operators.
I don't think the LIKE and IN operators would work

Update line 1337 to make the filtering on chkbxlst working
@Vaadasch
Copy link
Contributor Author

Vaadasch commented Oct 29, 2018

This one has a bug which made result of every option on new created object. If I can find where to update my code, i will. Else I will open a new pull request.
Sorry I left some "blank lines" or "space before commas" -_-

@eldy eldy changed the title [New|Close|Fix|?] Update working chkbxlst filter for lists NEW Update working chkbxlst filter for lists Oct 30, 2018
@eldy eldy added PR OK to merge PR was analyzed by PR merger and seems ok to be validated. Merge may occurs soon... PR postponed PR is postponed (will be processed later). Ie: feature pushed during a beta or need transition steps labels Oct 30, 2018
@eldy eldy merged commit 59e38d4 into Dolibarr:develop Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR OK to merge PR was analyzed by PR merger and seems ok to be validated. Merge may occurs soon... PR postponed PR is postponed (will be processed later). Ie: feature pushed during a beta or need transition steps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants