Bug 1367505

Summary: Not all files are available on the Content -> New pages if total number of files exceeds the items per page setting
Product: [JBoss] JBoss Operations Network Reporter: Amana <ajuricic>
Component: UIAssignee: Josejulio Martínez <jmartine>
Status: CLOSED ERRATA QA Contact: Hayk Hovsepyan <hhovsepy>
Severity: medium Docs Contact:
Priority: high    
Version: JON 3.3.6CC: ajuricic, fbrychta, hhovsepy, jmartine, loleary, spinder
Target Milestone: ER01Keywords: Triaged
Target Release: JON 3.3.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 18:45:08 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:
Attachments:
Description Flags
screenshots none

Description Amana 2016-08-16 14:36:29 UTC
##Description of problem:

After uploading more than 15 files to a content repository assigned to a war file deployed in an EAP, it is not listed properly in "x.war -> Content -> New". Although it is listed after increasing the number of items per page "items per pages=30" and refreshing the page.

##Version-Release number of selected component (if applicable):
JBoss ON 3.3.6

##How reproducible:
Always

## Steps to Reproduce:
1. Created a "Content -> Repository" in JON 3.3 and uploaded 15 files to it;
2. Navigated to EAP -> Deployments -> guess.war (any war application deployed) -> Content -> Subscriptions and added the repository created to it;
3. Navigated to "New" tab and see the 15 files listed;
4. Navigated to "Content -> Repository" again and added one more file to my repository;
5. Now when I go back to the "Content -> New" page, I am not able to see that last uploaded file in any page. 


##Actual results:
Even if I select "Items Per Pages = 30" I noticed that it list a duplicate file instead the last one. It requires to refresh the page with "items per pages=30" in order to get the last deployed file listed properly.


##Expected results:
If navigating to page 2, it should list the last uploaded file properly.

Comment 4 Amana 2016-08-26 14:08:54 UTC
Created attachment 1194348 [details]
screenshots

Comment 5 Amana 2016-08-26 14:13:48 UTC
Hi Filip,

I have attached some screenshots that can help you to view the issue. Here is a brief explanation about every picture:

-jon_Content_New_page1: There are 15 files (from 1.0 - 2.4) in page-1;
-jon_Content_New_page2: If navigating to page-2, it shows "1.1" version again, instead of "2.5";
-jon_Content_New_45items: If I switch "Items Per Page" from 15 to 45, you can see that it lists 16 files. However, it repeats "1.1" instead of showing "2.5".
-jon_Content_New_45items_afterRefresh: After refreshing the page, or just navigating to another page (e.g Configuration) and going back to "Content-> New", it now displays all 16 files properly (including 2.5 version).

pleas let me know if it clarifies the issue. Or if further information is required.

Thank you!

Comment 6 Josejulio Martínez 2016-12-15 17:29:39 UTC
This PR fixes the issue

https://github.com/rhq-project/rhq/pull/279

Comment 7 Josejulio Martínez 2016-12-29 19:46:56 UTC
commit 31b1995bd96a9f82aa1a1a013f8c6e066827639d
Merge: fef5e1d d5510f1
Author: Josejulio Martínez <finwemartinez>
Date:   Thu Dec 29 13:35:27 2016 -0600

    Merge pull request #279 from josejulio/bugs/1367505
    
    Bug 1367505 - Trims result to match page controls.


commit d5510f1aa1fa025a4835ddd4c5f92c54fd9a6d55
Author: Josejulio Martínez <jmartine>
Date:   Tue Dec 13 02:38:05 2016 -0600

    Bug 1367505 - Trims result to match page controls.

Comment 10 Hayk Hovsepyan 2017-01-30 14:42:12 UTC
Verified on ER01 build of JON 3.3.8.

Comment 11 errata-xmlrpc 2017-02-16 18:45:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2017-0285.html