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

[17.0][IMP]bi_sql_editor: scheduled action periodicity settings #903

Conversation

GuillemCForgeFlow
Copy link
Contributor

refactor Action Settings page to have all settings, renamed to Settings. Added the settings to be able to customize the periodicity of the Scheduled Action that will refresh the Materialized view.

cc @ForgeFlow

refactor `Action Settings` page to have all settings, renamed to `Settings`. Added the settings to be able to customize the periodicity of the Scheduled Action that will refresh the Materialized view.
@OCA-git-bot
Copy link
Contributor

Hi @legalsylvain,
some modules you are maintaining are being modified, check this out!

@GuillemCForgeFlow
Copy link
Contributor Author

Hi @legalsylvain, I'd like to get your input on this whenever you have some time
thank you in advance 🙂

@legalsylvain
Copy link
Contributor

Hi @GuillemCForgeFlow. Thanks for contributing.
I don't get the interest of this change. (Except that all cron information are managed in the SQL view.)
Could you elaborate ?
Thanks !

@GuillemCForgeFlow
Copy link
Contributor Author

Hi @GuillemCForgeFlow. Thanks for contributing. I don't get the interest of this change. (Except that all cron information are managed in the SQL view.) Could you elaborate ? Thanks !

Sure, the use case for this is that the periodicity of the refresh was too low. It could be changed at Scheduled Action level, but each time the view gets recreated (because the SQL definition changes) the Scheduled Action gets back to the original parameters.

I thought it would be great to have a general settings tab, in order to fulfill this kind of information if it needs to be changed based on specific needs. We can add more settings' groups on that tab if required in the future.

What do you think?

GuillemCForgeFlow added a commit to ForgeFlow/reporting-engine that referenced this pull request Aug 30, 2024
GuillemCForgeFlow added a commit to ForgeFlow/reporting-engine that referenced this pull request Aug 30, 2024
GuillemCForgeFlow added a commit to ForgeFlow/reporting-engine that referenced this pull request Aug 30, 2024
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

but each time the view gets recreated (because the SQL definition changes) the Scheduled Action gets back to the original parameters

You're right. That's the point. It should be changed, for exemple, disabling the cron instead of deleting it. What do you think ?
It avoid to duplicate fields in both modèls.

@GuillemCForgeFlow
Copy link
Contributor Author

but each time the view gets recreated (because the SQL definition changes) the Scheduled Action gets back to the original parameters

You're right. That's the point. It should be changed, for exemple, disabling the cron instead of deleting it. What do you think ? It avoid to duplicate fields in both modèls.

I agree, that seems to solve the issue for both of us. I will adjust the changes then to have this in place. Thank you for the input 😄

@GuillemCForgeFlow
Copy link
Contributor Author

closing, I will reference the implemented solution once done 👍🏿 @legalsylvain

GuillemCForgeFlow added a commit to ForgeFlow/reporting-engine that referenced this pull request Sep 2, 2024
…etting the SQL View

Based on the agreed solution: OCA#903 (review). It is best to archive the Scheduled Action every time you set back to the draft state. Then, when creating the SQL view, if it is a materialized view, unarchive the Scheduled Action if already exists, otherwise create it from scratch.
@GuillemCForgeFlow
Copy link
Contributor Author

Implemented agreed changes on #928

@GuillemCForgeFlow GuillemCForgeFlow deleted the 17.0-imp-bi_sql_editor-add_ir_cron_periodicity_settings branch September 2, 2024 09:24
GuillemCForgeFlow added a commit to ForgeFlow/reporting-engine that referenced this pull request Sep 2, 2024
…etting the SQL View

Based on the agreed solution: OCA#903 (review). It is best to archive the Scheduled Action every time you set back to the draft state. Then, when creating the SQL view, if it is a materialized view, unarchive the Scheduled Action if already exists, otherwise create it from scratch.
Then, if the SQL View is deleted, also make sure to remove the Scheduled Action if there is one assigned as it has not been done in the `button_set_draft` method
GuillemCForgeFlow added a commit to ForgeFlow/reporting-engine that referenced this pull request Sep 2, 2024
…etting the SQL View

Based on the agreed solution: OCA#903 (review). It is best to archive the Scheduled Action every time you set back to the draft state. Then, when creating the SQL view, if it is a materialized view, unarchive the Scheduled Action if already exists, otherwise create it from scratch.
Then, if the SQL View is deleted, also make sure to remove the Scheduled Action if there is one assigned as it has not been done in the `button_set_draft` method
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.

3 participants