Bug 871073 - Cannot create alert on group level
Cannot create alert on group level
Status: CLOSED DUPLICATE of bug 846451
Product: RHQ Project
Classification: Other
Component: Alerts (Show other bugs)
4.4
Unspecified Unspecified
unspecified Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-29 10:42 EDT by vlad crc
Modified: 2013-03-27 04:28 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-27 04:28:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description vlad crc 2012-10-29 10:42:58 EDT
Description of problem:
Cannot create alert on group level when logged in as user with limited permissions.


Version-Release number of selected component (if applicable):
4.4



How reproducible:
always



Steps to Reproduce:
Define a resource compatible group.
Define a role with permission to edit alerts on that group.
Define a user and assign it to that role.
Log in as that user.
Try to define an alert on group level, or on any node from the group tree browser.



Actual results:

Got error:
------------------------
java.lang.RuntimeException:[1351514874687] javax.ejb.EJBException:java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: group of: org.rhq.core.domain.alert.AlertDefinition [SELECT alertdefinition
FROM org.rhq.core.domain.alert.AlertDefinition alertdefinition
LEFT JOIN FETCH alertdefinition.groupAlertDefinition
WHERE ( alertdefinition.resourceGroup.id IN ( :resourceGroupIds )
AND alertdefinition.deleted = :deleted )
AND ( alertdefinition.group.id IN ( SELECT innerAlias.group.id
FROM alertdefinition innerAlias
JOIN innerAlias.group.roles r JOIN r.subjects s
WHERE s.id = 10131 )
OR
alertdefinition.group.id IN ( SELECT innerAlias.group.id
FROM alertdefinition innerAlias
JOIN innerAlias.group.clusterResourceGroup crg JOIN crg.roles r JOIN r.subjects s
WHERE crg.recursive = true AND s.id = 10131 )
OR
alertdefinition.group.id IN ( SELECT innerAlias.group.id
FROM alertdefinition innerAlias
JOIN innerAlias.group.subject s
WHERE s.id = 10131 ) )

] -> java.lang.IllegalArgumentException:org.hibernate.QueryException: could not resolve property: group of: org.rhq.core.domain.alert.AlertDefinition [SELECT alertdefinition
FROM org.rhq.core.domain.alert.AlertDefinition alertdefinition
LEFT JOIN FETCH alertdefinition.groupAlertDefinition
WHERE ( alertdefinition.resourceGroup.id IN ( :resourceGroupIds )
AND alertdefinition.deleted = :deleted )
AND ( alertdefinition.group.id IN ( SELECT innerAlias.group.id
FROM alertdefinition innerAlias
JOIN innerAlias.group.roles r JOIN r.subjects s
WHERE s.id = 10131 )
OR
alertdefinition.group.id IN ( SELECT innerAlias.group.id
FROM alertdefinition innerAlias
JOIN innerAlias.group.clusterResourceGroup crg JOIN crg.roles r JOIN r.subjects s
WHERE crg.recursive = true AND s.id = 10131 )
OR
alertdefinition.group.id IN ( SELECT innerAlias.group.id
FROM alertdefinition innerAlias
JOIN innerAlias.group.subject s



Expected results:
alert should be created successfully on group level.



Additional info:
If I login with rhqadmin user alert is successfully created.
Comment 1 vlad crc 2013-03-27 04:28:46 EDT

*** This bug has been marked as a duplicate of bug 846451 ***

Note You need to log in before you can comment on or make changes to this bug.