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

Add possibility to turn off 'Area Search' filter #1364

Merged
merged 2 commits into from
Feb 11, 2020
Merged

Add possibility to turn off 'Area Search' filter #1364

merged 2 commits into from
Feb 11, 2020

Conversation

pvpurcarcosmin
Copy link
Contributor

refs: #1363

Copy link
Member

@metas-ts metas-ts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls insert de.metas.ui.web.document.geo_location.filter_disabled into AD_SysConfig.

  • Why: otherwise we will generally forget that this switch actually exists
  • note that then in private customization-sqls you need to update it.

"but how do i make sure the insert was already done when me little update is run - besides letting the file name start with a bigger seqno" you ask?
for that we have db_fail_unless_row_count_greater_zero, so you can do

select db_fail_unless_row_count_greater_zero('UPDATE AD_SysConfig SET Value=''N/Y/etc'', Description=''Custom setting for... See issue (private user-issue).'' WHERE AD_SysConfig_ID=...');

consider (coming to my mind only now) to go with ..._enabled instead of "disabled.

  • why: one less ! needed in the code and in my head
  • (but sticking with idsabled is also ok for me)

@pvpurcarcosmin
Copy link
Contributor Author

pvpurcarcosmin commented Feb 11, 2020

Pls insert de.metas.ui.web.document.geo_location.filter_disabled into AD_SysConfig.

  • Why: otherwise we will generally forget that this switch actually exists
  • note that then in private customization-sqls you need to update it.

"but how do i make sure the insert was already done when me little update is run - besides letting the file name start with a bigger seqno" you ask?
for that we have db_fail_unless_row_count_greater_zero, so you can do

select db_fail_unless_row_count_greater_zero('UPDATE AD_SysConfig SET Value=''N/Y/etc'', Description=''Custom setting for... See issue (private user-issue).'' WHERE AD_SysConfig_ID=...');

consider (coming to my mind only now) to go with ..._enabled instead of "disabled.

  • why: one less ! needed in the code and in my head
  • (but sticking with idsabled is also ok for me)

--> agreed , the 'disabled' flag would've made sens in case we weren't going to add the sys config by default for everyone, but as we do, enabled makes more sens

@metas-ts
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ src/main/java/de/metas/ui/web/document/filter/provider/DocumentFilterDescriptorsProvidersService.java  -2
         

See the complete overview on Codacy

@metas-ts metas-ts merged commit fbdd0b4 into master Feb 11, 2020
@metas-ts metas-ts deleted the gh1363 branch February 11, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants