Bug 952980

Summary: [RFE] Filter job list by group
Product: [Retired] Beaker Reporter: Nick Coghlan <ncoghlan>
Component: web UIAssignee: Amit Saha <asaha>
Status: CLOSED CURRENTRELEASE QA Contact: Xin Zhang <xinzhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.12CC: asaha, dcallagh, ebaak, llim, mishin, qwan, rglasz, rmancy, szhou, xinzhang
Target Milestone: 0.13Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: UX
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-25 06:25:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 908183    
Bug Blocks:    

Description Nick Coghlan 2013-04-17 06:06:22 UTC
Both the "My Jobs" list and the main jobs list should allow filtering by owning group.

This is part of http://beaker-project.org/dev/proposals/enhanced-user-groups.html

Comment 1 Raymond Mancy 2013-04-29 23:48:15 UTC
In regard to the "My Jobs" list, do you mean 'enforce filtering' instead of 'allow filtering' ?

Comment 2 Nick Coghlan 2013-04-30 06:49:40 UTC
For My Jobs, we were thinking that it would be filtered to jobs owned by the user or groups where they are a member by default, but wouldn't have any specific restrictions if they started fiddling with the filter options.

Comment 3 Raymond Mancy 2013-05-01 02:47:28 UTC
(In reply to comment #2)
> For My Jobs, we were thinking that it would be filtered to jobs owned by the
> user or groups where they are a member by default, but wouldn't have any
> specific restrictions if they started fiddling with the filter options.

This wouldn't be consistent with it's current behaviour.

The specific restriction at the moment is that we always insert a 'Job.owner = user' into the query. Do we want to change this behaviour or should we just ask people to go to the regular jobs page if they no longer want to look at 'My Jobs'.

Comment 4 Nick Coghlan 2013-05-01 02:55:29 UTC
As in changing that standard filter to "my job, or submitted on behalf of one of my groups"? That would be fine - as you say, people can go to the main page if they want arbitrary filtering.

However, it should be possible to make the "My Jobs" filter *more* restrictive (i.e. exactly the jobs you own, or only jobs submitted on behalf of a particular group or groups)

Comment 5 Raymond Mancy 2013-05-01 23:56:27 UTC
http://gerrit.beaker-project.org/#/c/1910/

Comment 7 Nick Coghlan 2013-05-02 07:23:39 UTC
I believe this patch may have end up covering BZ#908185 as well

Comment 8 Raymond Mancy 2013-05-06 00:23:29 UTC
*** Bug 908185 has been marked as a duplicate of this bug. ***

Comment 11 Dan Callaghan 2013-05-21 00:26:59 UTC
This patch causes any "individual" jobs (that is, jobs without a group specified) to be omitted from the My Jobs page.

Probably needs .join(Job.group) changed to .outerjoin(Job.group), plus a test case :-)

Comment 12 Amit Saha 2013-05-21 07:56:13 UTC
On Gerrit: http://gerrit.beaker-project.org/#/c/1957/

Comment 14 Xin Zhang 2013-05-28 02:49:31 UTC
Verified that both the "My Jobs" list and the main jobs list allow to filter by group.

Version:beaker-server-redhat-0.1.14-1.el6eng, beaker-server-0.12.1-1.git.133.6c74a92.el6,beaker-0.12.1-1.git.133.6c74a92.el6

Comment 16 Amit Saha 2013-06-25 06:25:20 UTC
Beaker 0.13.1 has been released.