Commit bba403bf authored by Elias Englmeier's avatar Elias Englmeier
Browse files

getIdeasByUserIdProjectRef now returns all Idaes if pid is zero

parent 642082d0
...@@ -85,7 +85,7 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl { ...@@ -85,7 +85,7 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
public List<Ideas>getIdeasByUserRoleProjectId(String role, long userId, long projectId){ public List<Ideas>getIdeasByUserRoleProjectId(String role, long userId, long projectId){
ArrayList<Ideas> result = new ArrayList<Ideas>(); ArrayList<Ideas> result = new ArrayList<Ideas>();
for(Ideas i : IdeasUtil.findAll()){ for(Ideas i : IdeasUtil.findAll()){
if(i.getProjectRef() == projectId){ if(projectId ==0L || i.getProjectRef() == projectId){
if((role.equals(RoleConstants.ADMINISTRATOR) || role.equals(RoleConstants.PORTAL_CONTENT_REVIEWER)) if((role.equals(RoleConstants.ADMINISTRATOR) || role.equals(RoleConstants.PORTAL_CONTENT_REVIEWER))
&& !i.getReviewStatus().equals(ReviewStatus.SAVED.getReviewStatusDescription())){ && !i.getReviewStatus().equals(ReviewStatus.SAVED.getReviewStatusDescription())){
result.add(i); result.add(i);
...@@ -93,9 +93,6 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl { ...@@ -93,9 +93,6 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
else if(i.getUserId() == userId){ else if(i.getUserId() == userId){
result.add(i); result.add(i);
} }
// else if (i.getReviewStatus().equals(ReviewStatus.ACCEPTED.getReviewStatusDescription())){
// result.add(i);
// }
} }
} }
return result; return result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment