Bug 871073 - Cannot create alert on group level
Summary: Cannot create alert on group level
Keywords:
Status: CLOSED DUPLICATE of bug 846451
Alias: None
Product: RHQ Project
Classification: Other
Component: Alerts
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-29 14:42 UTC by vlad crc
Modified: 2013-03-27 08:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-27 08:28:46 UTC
Embargoed:


Attachments (Terms of Use)

Description vlad crc 2012-10-29 14:42:58 UTC
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 08:28:46 UTC

*** 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.