-
Notifications
You must be signed in to change notification settings - Fork 898
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
Load custom attribute before evaluation #14785
Load custom attribute before evaluation #14785
Conversation
Loading virtual custom attributes is not needed in constructor we need to load them when we need them and this place is in Condition#_subst method where Tag.list is called In addition, constructor is not called when MiqExpressin is loaded from yaml (for example as it is in used MiqReport#condition for generation reports)
this feature is need to test it in RBAC - filterer
In add_custom_attribute is also checking whether attribute has been already loaded
342841e
to
f4d298e
Compare
Checked commits lpichler/manageiq@549e80c~...f4d298e with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@miq-bot add_label fine/yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
…evaluation Load custom attribute before evaluation (cherry picked from commit 291b266)
Fine backport details:
|
@lpichler Need a BZ for Euwe backport... |
@lpichler ping ^ |
@simaishi Libor created https://bugzilla.redhat.com/show_bug.cgi?id=1459171 and I added it to the description. Thanks. |
@lpichler |
Backported to Euwe via #15320 |
introduced in #11369
Loading virtual custom attributes is not needed in constructor
we need to load them when we need them and this place is in
Condition#_subst
method whereTag.list
is calledIn addition, constructor is not called when MiqExpressin is loaded from yaml (for example as it is in used MiqReport#condition for generation reports)
This is fixing a bug when report has defined expression with virtual custom attribute and these attributes are not listed in Report#cols
@miq-bot add_label bug, core
@miq-bot assign @gtanzillo
https://bugzilla.redhat.com/show_bug.cgi?id=1459171