Bug 1060598 - [Regression] Obsolete projects are searchable, but not accessible (exception occurs)
Summary: [Regression] Obsolete projects are searchable, but not accessible (exception ...
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI   
(Show other bugs)
Version: development
Hardware: Unspecified Unspecified
unspecified
high
Target Milestone: ---
: 3.3
Assignee: Carlos Munoz
QA Contact: Damian Jansen
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-03 00:00 UTC by Damian Jansen
Modified: 2014-03-20 05:47 UTC (History)
3 users (show)

Fixed In Version: 3.3.0-SNAPSHOT (20140210-1007)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-20 05:47:36 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Damian Jansen 2014-02-03 00:00:57 UTC
Description of problem:
Projects made obsolete will be searched via the Project Search field, but cannot be viewed (javax.el.ELException: javax.persistence.EntityNotFoundException)

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

How reproducible:
Easy always

Steps to Reproduce:
1. Sign in as admin, click Projects, Create Project
2. Fill in whatever for the fields, set project status to OBSOLETE, click Save
3. Enter a few characters of the project name into the Search Projects field
4. Click the project when it appears

Actual results:
We're sorry
Record not found 

Expected results:
Obsolete projects should be accessible, at least by admin.

Additional info:
It previously was allowed to search for all projects, including Obsolete ones. If this is not _supposed_ to be the case, then the Search Projects field should not show Obsolete projects.

Comment 1 Sean Flanigan 2014-02-03 00:37:04 UTC
That might explain a stack trace we sometimes get in the production logs.

Comment 2 Damian Jansen 2014-02-03 01:41:47 UTC
It appears this only happens for non-admin users - if this is intended behaviour (i.e. users cannot view obsolete projects) then it should simply not allow clicking of the link, searching of the project or just display the project page with the title and description and an OBSOLETE label - not break and force them to backtrack.

Comment 3 Sean Flanigan 2014-02-03 03:09:49 UTC
Firstly, non-admin users should not be seeing obsolete projects in search results.

Secondly, if a non-admin somehow reaches the page for an obsolete project, he or she should get a 404 because the project has been 'deleted'.  (That's a bit weird, because a logged-in admin won't get a 404.  So it might be more standard to return a 401.  But let's not get into that right now.)

Comment 4 Carlos Munoz 2014-02-06 05:41:57 UTC
This was caused by trying to filter by non-existent fields in the lucene index. Added the fields to the index, and made sure the application is providing the right values in the lucene query.

See:
https://github.com/zanata/zanata-server/pull/357

Comment 5 Damian Jansen 2014-02-10 00:28:33 UTC
Verified at 6d62fa3ad5db48d5c3ad3b9927f84bf306f3cdc6

Comment 6 Sean Flanigan 2014-03-20 05:47:36 UTC
Closing VERIFIED bugs for Zanata server 3.3.2.


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