Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Exclude obsolete project from dashboard: https://bugzilla.redhat.com/…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Oct 23, 2014
1 parent 6d26d53 commit 0dbeebb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -127,7 +127,8 @@ public Object apply(@NonNull HLocale locale) {
}

private int countUserMaintainedProjects() {
return authenticatedAccount.getPerson().getMaintainerProjects().size();
return projectDAO.getMaintainedProjectCount(
authenticatedAccount.getPerson(), null);
}

private List<HProject> fetchUserMaintainedProjects() {
Expand Down
4 changes: 4 additions & 0 deletions zanata-war/src/main/java/org/zanata/dao/ProjectDAO.java
Expand Up @@ -406,6 +406,8 @@ public List<HProject> getProjectsForMaintainer(HPerson maintainer,
.createQuery(
"from HProject p " +
"where :maintainer in elements(p.maintainers) " +
"and p.status <> " +
"'" + EntityStatus.OBSOLETE.getInitial() + "' " +
"and (p.name like :filter " +
"or p.slug like :filter) " +
"order by p.name")
Expand All @@ -423,6 +425,8 @@ public int getMaintainedProjectCount(HPerson maintainer, String filter) {
.createQuery(
"select count(p) from HProject p " +
"where :maintainer in elements(p.maintainers) " +
"and p.status <> " +
"'" + EntityStatus.OBSOLETE.getInitial() + "' " +
"and (p.name like :filter " +
"or p.slug like :filter) "
)
Expand Down

0 comments on commit 0dbeebb

Please sign in to comment.