Changeset 17932
- Timestamp:
- 08/22/08 13:48:54 (3 months ago)
- Files:
-
- trunk/core/db/oracle/create-scripts/versions/8.5.0/update_system_properties.sql (modified) (1 diff)
- trunk/core/src/net/project/hibernate/dao/IPnAssignmentDAO.java (modified) (1 diff)
- trunk/core/src/net/project/hibernate/dao/impl/PnAssignmentDAOImpl.java (modified) (4 diffs)
- trunk/core/src/net/project/hibernate/model/PnAssignment.java (modified) (4 diffs)
- trunk/core/src/net/project/hibernate/service/IPnAssignmentService.java (modified) (2 diffs)
- trunk/core/src/net/project/hibernate/service/impl/PnAssignmentServiceImpl.java (modified) (6 diffs)
- trunk/core/src/net/project/view/pages/assignments/MyAssignments.java (modified) (16 diffs)
- trunk/core/web/html/assignments/MyAssignments.html (modified) (2 diffs)
- trunk/core/web/src/components/BaseTreeGrid.js (added)
- trunk/core/web/src/components/myAssignment-treeGrid.js (modified) (4 diffs)
- trunk/core/web/src/components/myAssignmentFilter-form.js (modified) (1 diff)
- trunk/core/web/src/components/myAssignments-dashboard.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/core/db/oracle/create-scripts/versions/8.5.0/update_system_properties.sql
r17930 r17932 248 248 values (2000,'en','text','prm.wiki.edit.describe.label','Edit summary (describe the changes you have made):','','A',0,1); 249 249 250 insert into PN_PROPERTY (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, RECORD_STATUS, IS_SYSTEM_PROPERTY, IS_TRANSLATABLE_PROPERTY, PROPERTY_VALUE_CLOB) 251 values (2000, 'en', 'text', 'prm.personal.assignments.defaultpagesize.value', '50', 'A', 0, 1, null); 252 250 253 commit; 251 254 prompt 0 records loaded trunk/core/src/net/project/hibernate/dao/IPnAssignmentDAO.java
r17870 r17932 83 83 Date endDate, 84 84 Integer statusId, 85 Integer percentComplete, 85 Double percentComplete, 86 String PercentCompleteComparator, 87 String assignmentName, 88 String assignmentNameComparator, 89 int offset, 90 int range 91 ); 92 93 public Integer getTotalAssignmentCountWithFilters( 94 Integer personId, 95 String assigneeORAssignor, 96 Integer[] projectIds, 97 Integer businessId, 98 String[] assignmentTypes, 99 boolean lateAssignment, 100 boolean comingDueDate, 101 boolean shouldHaveStart, 102 boolean inProgress, 103 Date startDate, 104 Date endDate, 105 Integer statusId, 106 Double percentComplete, 86 107 String PercentCompleteComparator, 87 108 String assignmentName, trunk/core/src/net/project/hibernate/dao/impl/PnAssignmentDAOImpl.java
r17884 r17932 713 713 Date endDate, 714 714 Integer statusId, 715 IntegerpercentComplete,715 Double percentComplete, 716 716 String PercentCompleteComparator, 717 717 String assignmentName, 718 String assignmentNameComparator 718 String assignmentNameComparator, 719 int offset, 720 int range 719 721 ){ 720 722 List<PnAssignment> assignments = new ArrayList<PnAssignment>(); 721 String sql = "SELECT new PnAssignment (" 722 +" p1.displayName, (SELECT p.displayName FROM PnPerson p WHERE p.personId = a.pnAssignor.personId ), " 723 724 String sql = "SELECT new PnAssignment (" 725 +" p.displayName, assignor.displayName, " 723 726 +" a.comp_id.spaceId, on1.name, " 724 727 +" o2.pnObjectType.objectType, " 725 728 +" a.work, a.workUnits, a.workComplete, a.startDate, a.endDate, a.percentAllocated," 726 +" a.comp_id.objectId, on2.name ) "727 +" FROM PnAssignment a , "728 +" PnObject o1, PnObject o2, "729 +" a.comp_id.objectId, on2.name ) " 730 +" FROM PnAssignment a left join a.pnAssignor assignor, " 731 +" PnObject o1, PnObject o2, " 729 732 +" PnObjectName on1, PnObjectName on2, " 730 +" PnPerson p 1"733 +" PnPerson p " 731 734 +" WHERE o1.objectId = a.comp_id.spaceId " 732 735 +" AND o2.objectId = a.comp_id.objectId " … … 736 739 +" AND o1.recordStatus = 'A' " 737 740 +" AND o2.recordStatus = 'A' " 738 +" AND p 1.personId = a.comp_id.personId ";741 +" AND p.personId = a.comp_id.personId "; 739 742 740 743 if(assigneeORAssignor.equalsIgnoreCase("assignor")){//assignor Assignment … … 865 868 866 869 if (percentComplete != null && PercentCompleteComparator != null) { 867 query.set Integer("percentComplete", percentComplete);870 query.setDouble("percentComplete", percentComplete); 868 871 } 869 872 … … 875 878 } 876 879 } 880 if(offset != 0){ 881 query.setFirstResult(offset); 882 } 883 if(range != 0){ 884 query.setMaxResults(range); 885 } 877 886 assignments = query.list(); 878 887 } catch (Exception e) { 879 log.error("Error occured while getting resource assignment details"+e.getMessage());888 log.error("Error occured while getting person Assignment "+e.getMessage()); 880 889 } 881 890 return assignments; 882 891 } 892 893 public Integer getTotalAssignmentCountWithFilters( 894 Integer personId, 895 String assigneeORAssignor, 896 Integer[] projectIds, 897 Integer businessId, 898 String[] assignmentTypes, 899 boolean lateAssignment, 900 boolean comingDueDate, 901 boolean shouldHaveStart, 902 boolean inProgress, 903 Date startDate, 904 Date endDate, 905 Integer statusId, 906 Double percentComplete, 907 String PercentCompleteComparator, 908 String assignmentName, 909 String assignmentNameComparator 910 ){ 911 Integer nAssignment = 0; 912 String sql = " SELECT count(a.comp_id.objectId) " 913 +" FROM PnAssignment a left join a.pnAssignor assignor, " 914 +" PnObject o1, PnObject o2, " 915 +" PnObjectName on1, PnObjectName on2, " 916 +" PnPerson p " 917 +" WHERE o1.objectId = a.comp_id.spaceId " 918 +" AND o2.objectId = a.comp_id.objectId " 919 +" AND on1.objectId = a.comp_id.spaceId " 920 +" AND on2.objectId = a.comp_id.objectId " 921 +" AND a.recordStatus = 'A' " 922 +" AND o1.recordStatus = 'A' " 923 +" AND o2.recordStatus = 'A' " 924 +" AND p.personId = a.comp_id.personId "; 925 926 if(assigneeORAssignor.equalsIgnoreCase("assignor")){//assignor Assignment 927 sql += " AND a.pnAssignor.personId = :personId "; 928 929 } else if(assigneeORAssignor.equalsIgnoreCase("assignee")){//resource Assignment 930 sql += " AND a.comp_id.personId = :personId "; 931 } else { 932 sql += " AND( a.pnAssignor.personId = :personId OR a.comp_id.personId = :personId )"; 933 } 934 935 //project ids clause 936 if(projectIds != null){ 937 sql += " AND a.comp_id.spaceId IN( :projectIds )"; 938 } 939 940 if(businessId != null){ 941 sql += " AND a.comp_id.spaceId IN(" 942 +" select distinct shs.comp_id.childSpaceId from PnSpaceHasSpace shs " 943 +" where shs.parentSpaceType = 'business' " 944 +" and shs.comp_id.parentSpaceId = :businessId and shs.recordStatus = 'A')"; 945 } 946 947 //Assignment type clause 948 if(assignmentTypes != null){ 949 sql += " AND o2.pnObjectType.objectType IN( :assignmentTypes )"; 950 } 951 952 if(lateAssignment){ 953 sql += " AND ((a.percentComplete is null) OR " 954 +" (a.endDate < :toDayDate AND " 955 +" (a.percentComplete < 1))) "; 956 } 957 958 if(comingDueDate){ 959 sql += " AND ((a.endDate <= :toDayDatePlus7 ) AND (a.endDate >= :toDayDate))"; 960 } 961 962 if(shouldHaveStart){ 963 sql += " AND ((a.percentComplete is null) OR " 964 +" (a.startDate <= :toDayDate AND " 965 +" (a.percentComplete = 0))) "; 966 } 967 968 if(inProgress){ 969 sql += " AND (a.percentComplete > 0 and a.percentComplete < 1)"; 970 } 971 972 if(startDate != null && endDate != null){ 973 if(startDate.equals(endDate)){ 974 sql += " AND a.startDate <= :startDate "; 975 sql += " AND a.endDate >= :endDate "; 976 } else { 977 sql += " AND ( a.startDate between :startDate and :endDate "; 978 sql += " or a.endDate between :startDate and :endDate ) "; 979 } 980 } 981 982 if(statusId != null){ 983 sql += " AND a.statusId = :statusId"; 984 } 985 986 if( percentComplete!=null && PercentCompleteComparator != null){ 987 if(PercentCompleteComparator.equalsIgnoreCase("equals")){ 988 sql += " AND a.percentComplete = :percentComplete "; 989 } 990 if(PercentCompleteComparator.equalsIgnoreCase("notequals")){ 991 sql += " AND a.percentComplete != :percentComplete "; 992 } 993 if(PercentCompleteComparator.equalsIgnoreCase("lessthan")){ 994 sql += " AND a.percentComplete < :percentComplete "; 995 } 996 if(PercentCompleteComparator.equalsIgnoreCase("greaterthan")){ 997 sql += " AND a.percentComplete > :percentComplete "; 998 } 999 } 1000 if( assignmentName!=null && assignmentNameComparator != null){ 1001 if(assignmentNameComparator.equalsIgnoreCase("equals")){ 1002 sql += " AND on2.name = :assignmentName "; 1003 } 1004 if(assignmentNameComparator.equalsIgnoreCase("notequals")){ 1005 sql += " AND on2.name != :assignmentName "; 1006 } 1007 if(assignmentNameComparator.equalsIgnoreCase("contains")){ 1008 sql += " AND upper(on2.name) like upper(:assignmentName) "; 1009 } 1010 } 1011 1012 sql += " ORDER BY on1.name , a.comp_id.spaceId "; 1013 1014 try{ 1015 Query query = getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery(sql); 1016 query.setInteger("personId", personId); 1017 1018 if (projectIds != null) { 1019 query.setParameterList("projectIds", projectIds); 1020 } 1021 1022 if(businessId != null){ 1023 query.setParameter("businessId", businessId); 1024 } 1025 1026 if (assignmentTypes != null) { 1027 query.setParameterList("assignmentTypes", assignmentTypes); 1028 } 1029 1030 if (lateAssignment || comingDueDate || shouldHaveStart) { 1031 query.setDate("toDayDate", new Date()); 1032 } 1033 1034 if (comingDueDate) { 1035 Calendar cal = Calendar.getInstance(); 1036 cal.add(Calendar.DATE, 8); 1037 query.setDate("toDayDatePlus7", cal.getTime()); 1038 } 1039 1040 if (startDate != null) { 1041 query.setDate("startDate", startDate); 1042 } 1043 1044 if (endDate != null) { 1045 query.setDate("endDate", endDate); 1046 } 1047 1048 if (statusId != null) { 1049 query.setInteger("statusId", statusId); 1050 } 1051 1052 if (percentComplete != null && PercentCompleteComparator != null) { 1053 query.setDouble("percentComplete", percentComplete); 1054 } 1055 1056 if (assignmentName != null && assignmentNameComparator != null) { 1057 if (assignmentNameComparator.equalsIgnoreCase("contains")) { 1058 query.setParameter("assignmentName", "%" + assignmentName + "%"); 1059 } else { 1060 query.setParameter("assignmentName", assignmentName); 1061 } 1062 } 1063 nAssignment = Integer.parseInt(query.uniqueResult().toString()); 1064 1065 } catch (Exception e) { 1066 log.error("Error occured while getting count of Assignment "+e.getMessage()); 1067 } 1068 return nAssignment; 1069 } 883 1070 884 1071 } trunk/core/src/net/project/hibernate/model/PnAssignment.java
r17870 r17932 102 102 103 103 private net.project.hibernate.model.PnObjectType pnObjectType; 104 105 private String assignorName;106 104 107 105 private net.project.hibernate.model.PnObjectName pnObjectName; … … 233 231 Integer percentAllocated, 234 232 Integer assignmentId, 235 String assignmentName ) {233 String assignmentName) { 236 234 this.personName = personName; 237 this.assignorName = assignorName; 235 this.pnAssignor = new PnPerson(); 236 pnAssignor.setDisplayName(assignorName); 238 237 PnProjectSpace pnProjectSpace = new PnProjectSpace(projectId, projectName); 239 238 this.pnProjectSpace = pnProjectSpace; … … 644 643 645 644 /** 646 * @return the assignorName647 */648 public String getAssignorName() {649 return assignorName;650 }651 652 /**653 * @param assignorName the assignorName to set654 */655 public void setAssignorName(String assignorName) {656 this.assignorName = assignorName;657 }658 659 /**660 645 * @return the pnObjectName 661 646 */ … … 670 655 this.pnObjectName = pnObjectName; 671 656 } 672 673 674 657 675 658 } trunk/core/src/net/project/hibernate/service/IPnAssignmentService.java
r17884 r17932 59 59 public List<Assignment> getAssigmentsByAssignor(Integer assignorId); 60 60 61 public Integer getTotalAssignmentCountWithFilters( 62 Integer personId, 63 String assigneeORAssignor, 64 Integer[] projectIds, 65 Integer businessId, 66 String[] assignmentTypes, 67 boolean lateAssignment, 68 boolean comingDueDate, 69 boolean shouldHaveStart, 70 boolean InProgress, 71 Date startDate, 72 Date endDate, 73 Integer statusId, 74 Double percentComplete, 75 String PercentCompleteComparator, 76 String assignmentName, 77 String assignmentNameComparator 78 ); 79 61 80 public String getAssignmentsTreeData( 62 81 Integer personId, … … 72 91 Date endDate, 73 92 Integer statusId, 74 IntegerpercentComplete,93 Double percentComplete, 75 94 String PercentCompleteComparator, 76 95 String assignmentName, 77 96 String assignmentNameComparator, 78 97 DateFormat userDateFormat, 79 String treeViewParamerer 98 String assignmentViewParameter, 99 int offset, 100 int range 80 101 ); 81 102 trunk/core/src/net/project/hibernate/service/impl/PnAssignmentServiceImpl.java
r17903 r17932 665 665 } 666 666 667 public Integer getTotalAssignmentCountWithFilters( 668 Integer personId, 669 String assigneeORAssignor, 670 Integer[] projectIds, 671 Integer businessId, 672 String[] assignmentTypes, 673 boolean lateAssignment, 674 boolean comingDueDate, 675 boolean shouldHaveStart, 676 boolean InProgress, 677 Date startDate, 678 Date endDate, 679 Integer statusId, 680 Double percentComplete, 681 String PercentCompleteComparator, 682 String assignmentName, 683 String assignmentNameComparator 684 ) { 685 return pnAssignmentDAO.getTotalAssignmentCountWithFilters(personId, assigneeORAssignor, projectIds, businessId, 686 assignmentTypes, lateAssignment, comingDueDate, shouldHaveStart, InProgress, startDate, endDate, 687 statusId, percentComplete, PercentCompleteComparator, assignmentName, assignmentNameComparator); 688 } 689 667 690 public String getAssignmentsTreeData( 668 691 Integer personId, … … 678 701 Date endDate, 679 702 Integer statusId, 680 IntegerpercentComplete,703 Double percentComplete, 681 704 String PercentCompleteComparator, 682 705 String assignmentName, 683 706 String assignmentNameComparator, 684 707 DateFormat userDateFormat, 685 String treeViewParamerer 708 String assignmentViewParameter, 709 int offset, 710 int range 686 711 ) { 687 return getMyAssignmentGridDataString(pnAssignmentDAO.getAssignmentDetailsWithFilters(personId, assigneeORAssignor,712 return getMyAssignmentGridDataString(pnAssignmentDAO.getAssignmentDetailsWithFilters(personId, assigneeORAssignor, 688 713 projectIds, businessId, assignmentTypes, lateAssignment, comingDueDate, shouldHaveStart, 689 714 InProgress, startDate, endDate, statusId, percentComplete, PercentCompleteComparator, 690 assignmentName, assignmentNameComparator ), userDateFormat, treeViewParamerer);715 assignmentName, assignmentNameComparator, offset, range), userDateFormat, assignmentViewParameter); 691 716 } 692 717 … … 707 732 } 708 733 709 private String getMyAssignmentGridDataString(List<PnAssignment> assignments, DateFormat userDateFormat, String treeViewParamerer){710 final List<String> columns = new ArrayList<String>(3);734 private String getMyAssignmentGridDataString(List<PnAssignment> assignments, DateFormat userDateFormat, String assignmentViewParameter){ 735 final List<String> columns = new ArrayList<String>(3); 711 736 columns.add("objectId"); 712 737 columns.add("objectName"); … … 725 750 for (PnAssignment assignment : assignments) { 726 751 if (isAssignableType(assignment.getPnObjectType().getObjectType())) { 727 if (projectId != assignment.getPnProjectSpace().getProjectId() && ! treeViewParamerer.equals("flat")) {752 if (projectId != assignment.getPnProjectSpace().getProjectId() && !assignmentViewParameter.equals("flat")) { 728 753 parentNode = factory.nextNode(); 729 754 parentNode.set("objectId", assignment.getPnProjectSpace().getProjectId()); … … 744 769 .getWorkComplete(), assignment.getWorkUnits())); 745 770 childNode.set("workSpace", assignment.getPnProjectSpace().getProjectName().replaceAll("'", "´")); 746 childNode.set("assignorName", (StringUtils.isNotEmpty(assignment.get AssignorName()) ?747 assignment.get AssignorName().replaceAll("'", "´") : ""));771 childNode.set("assignorName", (StringUtils.isNotEmpty(assignment.getPnAssignor().getDisplayName()) ? 772 assignment.getPnAssignor().getDisplayName().replaceAll("'", "´") : "")); 748 773 childNode.set("assigneeName", assignment.getPersonName().replaceAll("'", "´")); 749 774 if(parentNode!= null){ … … 774 799 json.deleteCharAt(json.length()-1); 775 800 } 776 return "[" + json.toString() + "]";801 return json.toString(); 777 802 } 778 803 trunk/core/src/net/project/view/pages/assignments/MyAssignments.java
r17903 r17932 23 23 import net.project.hibernate.model.PnWeblogEntry; 24 24 import net.project.hibernate.service.IBlogProvider; 25 import net.project.hibernate.service.IPnAssignmentService; 25 26 import net.project.hibernate.service.IPnAssignmentWorkService; 26 27 import net.project.hibernate.service.IPnObjectTypeService; … … 84 85 85 86 @Persist 86 private String[] assignmentTypes ;87 private String[] assignmentTypes = new String [5] ; 87 88 88 89 @Persist … … 108 109 109 110 @Persist 110 private IntegerpercentComplete;111 private Double percentComplete; 111 112 112 113 @Persist … … 126 127 127 128 @Persist 128 private String treeViewParamerer;129 private String assignmentViewParameter; 129 130 130 131 @Persist 131 132 private String userId; 132 133 133 private final String COLUMN_PROPERTY_CONTEXT = "net.project.column.My Project";134 135 private static final String PROPERTY = "MyAssignments column";134 private final String COLUMN_PROPERTY_CONTEXT = "net.project.column.MyAssignments"; 135 136 private static final String PROPERTY = "MyAssignmentsColumn"; 136 137 137 138 private String myAssignmentsColumn; 138 139 140 @Persist 141 private Integer totalAssignment; 142 143 @Persist 144 private String defaultPageSize; 145 146 private IPnAssignmentService pnAssignmentService; 139 147 140 148 private enum AssignmentsAction { … … 158 166 validationMessageForBlogEntry = PropertyProvider.get("prm.blog.addweblogentry.validation.message"); 159 167 validationMessageForBlogComment = PropertyProvider.get("prm.blog.addweblogentrycomment.validation.message"); 168 defaultPageSize = PropertyProvider.get("prm.personal.assignments.defaultpagesize.value"); 169 pnAssignmentService = ServiceFactory.getInstance().getPnAssignmentService(); 170 171 //initializing defaut parameter for getting assignment data. 160 172 assigneeOrAssignorParameter = "assignee"; 161 treeViewParamerer = "indent"; 173 assignmentTypes[0] = "task"; 174 percentComplete = 1.00; 175 percentCompleteComparator = "lessthan"; 176 assignmentViewParameter = "indent"; 177 162 178 } catch (Exception e) { 163 179 log.error("Error occured while getting property tokens : " + e.getMessage()); … … 169 185 createUserBusinessOptionsString(); 170 186 createUserProjectOptionsString(); 187 initializeMyTotalAssignmentsCount(); 171 188 initializeMyAssignmentsColumn(); 172 189 } … … 193 210 if (action != null) { 194 211 if (action.equalsIgnoreCase(AssignmentsAction.SETVIEWPARAMETER.toString())) { 195 set TreeViewParamerer(StringUtils.isNotEmpty(request.getParameter("view")) ? request212 setAssignmentViewParameter(StringUtils.isNotEmpty(request.getParameter("view")) ? request 196 213 .getParameter("view") : "indent"); 197 214 } 198 215 else if (action.equalsIgnoreCase(AssignmentsAction.SETFILTERPARAMETER.toString())) { 199 216 setAllFilterParameter(request); 217 initializeMyTotalAssignmentsCount(); 200 218 } 201 219 else if (action.equalsIgnoreCase(AssignmentsAction.GETASSIGNMENTSTREEDATA.toString())) { 202 return getAssignmentTreeData( );220 return getAssignmentTreeData(request); 203 221 } 204 222 else if (action.equalsIgnoreCase((AssignmentsAction.LOADBLOGENTRIES).toString())) { … … 256 274 } 257 275 258 public TextStreamResponse getAssignmentTreeData() { 259 return new TextStreamResponse("text/json", ServiceFactory.getInstance().getPnAssignmentService().getAssignmentsTreeData(Integer 260 .parseInt(SessionManager.getUser().getID()), assigneeOrAssignorParameter, projectIds, businessId, assignmentTypes, lateAssignment, 261 comingDueDate, shouldHaveStart, inProgress, startDate, endDate, statusId, percentComplete, 262 percentCompleteComparator, assignmentName, assignmentNameComparator, userDateFormat, treeViewParamerer)); 276 public TextStreamResponse getAssignmentTreeData(HttpServletRequest request) { 277 int offset = StringUtils.isNotEmpty(request.getParameter("start")) ? Integer.parseInt(request.getParameter("start")) : 0; 278 int range = StringUtils.isNotEmpty(request.getParameter("limit")) ? Integer.parseInt(request.getParameter("limit")) : 0; 279 280 return new TextStreamResponse("text/json", "{\"success\":true,\"total\":" 281 + totalAssignment 282 + ",\"data\":[" 283 + pnAssignmentService.getAssignmentsTreeData(Integer.parseInt(SessionManager.getUser().getID()), 284 assigneeOrAssignorParameter, projectIds, businessId, assignmentTypes, lateAssignment, 285 comingDueDate, shouldHaveStart, inProgress, startDate, endDate, statusId, percentComplete, 286 percentCompleteComparator, assignmentName, assignmentNameComparator, userDateFormat, 287 assignmentViewParameter, offset, range) 288 289 + "]}"); 263 290 } 264 291 … … 446 473 if (StringUtils.isNotEmpty(request.getParameter("percentComplete")) 447 474 && StringUtils.isNotEmpty(request.getParameter("percentCompleteComparator"))) { 448 percentComplete = Integer.parseInt(request.getParameter("percentComplete")) ;475 percentComplete = Integer.parseInt(request.getParameter("percentComplete"))/100.0; 449 476 percentCompleteComparator = request.getParameter("percentCompleteComparator"); 450 477 } else { … … 475 502 } 476 503 504 private void initializeMyTotalAssignmentsCount() { 505 totalAssignment = pnAssignmentService.getTotalAssignmentCountWithFilters(Integer.parseInt(SessionManager 506 .getUser().getID()), assigneeOrAssignorParameter, projectIds, businessId, assignmentTypes, 507 lateAssignment, comingDueDate, shouldHaveStart, inProgress, startDate, endDate, statusId, 508 percentComplete, percentCompleteComparator, assignmentName, assignmentNameComparator); 509 } 510 477 511 private void initializeMyAssignmentsColumn(){ 478 512 String columns[] = {"objectName","workSpace","dueDate","workRemaining","objectId","objectType","assigneeName","assignorName"}; 479 myAssignmentsColumn = "[{"; 513 myAssignmentsColumn = "[{"; 514 PersonProperty personProperty = new PersonProperty(); 515 personProperty.setScope(ScopeType.GLOBAL.makeScope(SessionManager.getUser())); 516 480 517 for(String column : columns){ 481 518 if(!myAssignmentsColumn.equals("[{")){ 482 519 myAssignmentsColumn += ","; 483 520 } 484 myAssignmentsColumn += "'" + column + "' : "+getColumnValue(column );521 myAssignmentsColumn += "'" + column + "' : "+getColumnValue(column, personProperty); 485 522 } 486 523 myAssignmentsColumn += "}]"; 487 524 } 488 525 489 private String getColumnValue(String column){ 490 PersonProperty personProperty = new PersonProperty(); 491 personProperty.setScope(ScopeType.GLOBAL.makeScope(SessionManager.getUser())); 526 private String getColumnValue(String column, PersonProperty personProperty){ 492 527 return (personProperty.get(COLUMN_PROPERTY_CONTEXT + "_" + column, PROPERTY) != null 493 528 && personProperty.get(COLUMN_PROPERTY_CONTEXT + "_" + column, PROPERTY).length > 0 … … 501 536 if (StringUtils.isNotEmpty(column) && StringUtils.isNotEmpty(value)) { 502 537 PersonProperty personProperty = new PersonProperty(); 538 personProperty.setScope(ScopeType.GLOBAL.makeScope(SessionManager.getUser())); 503 539 try { 504 personProperty.setScope(ScopeType.GLOBAL.makeScope(SessionManager.getUser()));505 540 personProperty.removeAllValues(COLUMN_PROPERTY_CONTEXT + "_" + column, PROPERTY); 506 541 personProperty.put(COLUMN_PROPERTY_CONTEXT + "_" + column, PROPERTY, value); 507 542 } catch (PersistenceException pnetEx) { 508 pnetEx.printStackTrace(); 543 log.error("Database error while replacing column property in MyAssignments.replaceMyAssignmentsColumn(): " 544 + pnetEx.getMessage()); 509 545 } 510 546 } … … 655 691 * @return the percentComplete 656 692 */ 657 public IntegergetPercentComplete() {693 public Double getPercentComplete() { 658 694 return percentComplete; 659 695 } … … 662 698 * @param percentComplete the percentComplete to set 663 699 */ 664 public void setPercentComplete( IntegerpercentComplete) {700 public void setPercentComplete(Double percentComplete) { 665 701 this.percentComplete = percentComplete; 666 702 } … … 788 824 * @return the treeViewParamerer 789 825 */ 790 public String get TreeViewParamerer() {791 return treeViewParamerer;826 public String getAssignmentViewParameter() { 827 return assignmentViewParameter; 792 828 } 793 829 … … 795 831 * @param treeViewParamerer the treeViewParamerer to set 796 832 */ 797 public void set TreeViewParamerer(String treeViewParamerer) {798 this. treeViewParamerer = treeViewParamerer;833 public void setAssignmentViewParameter(String assignmentViewParameter) { 834 this.assignmentViewParameter = assignmentViewParameter; 799 835 } 800 836 … … 827 863 } 828 864 865 /** 866 * @return the defaultPageSize 867 */ 868 public String getDefaultPageSize() { 869 return defaultPageSize; 870 } 871 872 /** 873 * @param defaultPageSize the defaultPageSize to set 874 */ 875 public void setDefaultPageSize(String defaultPageSize) { 876 this.defaultPageSize = defaultPageSize; 877 } 878 879 /** 880 * @return the totalAssignment 881 */ 882 public Integer getTotalAssignment() { 883 return totalAssignment; 884 } 885 886 /** 887 * @param totalAssignment the totalAssignment to set 888 */ 889 public void setTotalAssignment(Integer totalAssignment) { 890 this.totalAssignment = totalAssignment; 891 } 892 829 893 } trunk/core/web/html/assignments/MyAssignments.html
r17903 r17932 <50 50 var projectOptionsData = ${projectOptionsString};
