Changeset 17725
- Timestamp:
- 07/10/08 05:16:28 (6 months ago)
- Files:
-
- trunk (modified) (1 prop)
- trunk/core/db/oracle/create-scripts/versions/8.4.0/new/packages/schedule.bdy (modified) (5 diffs)
- trunk/core/db/oracle/create-scripts/versions/8.4.0/new/packages/schedule.spc (modified) (1 diff)
- trunk/core/db/oracle/create-scripts/versions/8.4.0/new/tables/tables.sql (modified) (1 diff)
- trunk/core/db/oracle/create-scripts/versions/8.4.0/packages/pkg_schedule.sql (added)
- trunk/core/db/oracle/create-scripts/versions/8.4.0/prm_db_patch_8.4.0.sql (modified) (2 diffs)
- trunk/core/db/oracle/create-scripts/versions/8.4.0/tables/alter_pn_assignment.sql (added)
- trunk/core/src/net/project/admin/RegistrationBean.java (modified) (2 diffs)
- trunk/core/src/net/project/calendar/AttendeeBean.java (modified) (7 diffs)
- trunk/core/src/net/project/calendar/Meeting.java (modified) (1 diff)
- trunk/core/src/net/project/form/assignment/FormAssignment.java (modified) (1 diff)
- trunk/core/src/net/project/form/assignment/mvc/handler/FormAssignmentHandler.java (modified) (3 diffs)
- trunk/core/src/net/project/hibernate/model/PnAssignment.hbm.xml (modified) (1 diff)
- trunk/core/src/net/project/hibernate/model/PnAssignment.java (modified) (9 diffs)
- trunk/core/src/net/project/resource/ActivityAssignment.java (modified) (2 diffs)
- trunk/core/src/net/project/resource/Assignment.java (modified) (14 diffs)
- trunk/core/src/net/project/resource/AssignmentFinder.java (modified) (3 diffs)
- trunk/core/src/net/project/resource/ScheduleEntryAssignment.java (modified) (1 diff)
- trunk/core/src/net/project/resource/SpaceInvitationProcessor.java (modified) (2 diffs)
- trunk/core/src/net/project/schedule/mvc/handler/taskcalculate/AssignmentAddRemoveHandler.java (modified) (3 diffs)
- trunk/core/src/net/project/schedule/mvc/handler/tasklist/AssignResourcesDialogHandlerProcessing.java (modified) (2 diffs)
- trunk/core/src/net/project/security/SessionManager.java (modified) (1 diff)
- trunk/core/src/net/project/view/pages/resource/management/DirectoryService.java (modified) (3 diffs)
- trunk/core/web/jsp/calendar/MeetingAddAttendeesProcessing.jsp (modified) (2 diffs)
- trunk/core/web/jsp/calendar/MeetingAttendeeItemProcessing.jsp (modified) (2 diffs)
- trunk/core/web/jsp/calendar/MeetingEditProcessing.jsp (modified) (1 diff)
- trunk/test/acceptance (modified) (1 prop)
- trunk/test/unit-test (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk
- Property svn:ignore changed from
*.iml
packages
.classpath
.project
output
test.obj
.settings
bin
*.log
to
*.iml
packages
.classpath
.project
output
test.obj
.settings
bin
*.log
*.class
- Property svn:ignore changed from
trunk/core/db/oracle/create-scripts/versions/8.4.0/new/packages/schedule.bdy
r17524 r17725 553 553 i_modified_by in NUMBER, 554 554 i_record_status IN VARCHAR2, 555 i_assignor_id IN NUMBER, 555 556 o_status OUT NUMBER 556 557 ) … … 562 563 -- Robin 11-May-00 Changed error codes to coincide with new table. 563 564 -- Tim 10-Jul-01 Added due_datetime 565 -- Sachin 07-Jul-08 Added assignor concept 564 566 IS 565 567 … … 601 603 602 604 INSERT INTO pn_assignment 603 (space_id, person_id, object_id, status_id, percent_allocated, role,605 (space_id, person_id, assignor_id, object_id, status_id, percent_allocated, role, 604 606 is_primary_owner, start_date, end_date, actual_start, actual_finish, 605 607 estimated_finish, work, work_units, work_complete, … … 607 609 modified_date, record_status, date_created) 608 610 VALUES 609 (i_space_id, i_person_id, i_ object_id, i_status_id, i_percent, i_role,611 (i_space_id, i_person_id, i_assignor_id, i_object_id, i_status_id, i_percent, i_role, 610 612 i_primary_owner, i_start_date, i_end_date, i_actual_start, 611 613 i_actual_finish, i_estimated_finish, i_work, i_work_units, … … 636 638 modified_by = i_modified_by, 637 639 modified_date = SYSDATE, 638 record_status = i_record_status 640 record_status = i_record_status, 641 assignor_id = i_assignor_id 639 642 WHERE space_id = i_space_id 640 643 AND person_id = i_person_id trunk/core/db/oracle/create-scripts/versions/8.4.0/new/packages/schedule.spc
r17524 r17725 32 32 i_modified_by in NUMBER, 33 33 i_record_status IN VARCHAR2, 34 i_assignor_id IN NUMBER, 34 35 o_status OUT NUMBER 35 36 ); trunk/core/db/oracle/create-scripts/versions/8.4.0/new/tables/tables.sql
r17654 r17725 7203 7203 create index TIMELOG_IDX1 on PN_TIMELOG (PERSON_ID); 7204 7204 create index TIMELOG_IDX2 on PN_TIMELOG (OBJECT_ID); 7205 7206 7207 prompt 7208 prompt Adding more columns for PN_ASSIGNMENT.... 7209 prompt ============================== 7210 prompt 7211 alter table PN_ASSIGNMENT 7212 add (ASSIGNOR_ID NUMBER(20)); 7213 alter table PN_ASSIGNMENT 7214 add constraint ASSIGNMENT_FK3 foreign key (ASSIGNOR_ID) 7215 references PN_PERSON (PERSON_ID); 7216 create index ASSIGNMENT_IDX3 on PN_ASSIGNMENT (ASSIGNOR_ID); trunk/core/db/oracle/create-scripts/versions/8.4.0/prm_db_patch_8.4.0.sql
r17644 r17725 60 60 COMMIT; 61 61 62 PROMPT Executing alter_pn_assignment.sql 63 @versions/8.4.0/tables/alter_pn_assignment.sql 64 COMMIT; 65 62 66 PROMPT Executing cr_pn_weblog.sql 63 67 @versions/8.4.0/tables/cr_pn_weblog.sql … … 104 108 --COMMIT; 105 109 110 PROMPT Executing pkg_schedule.sql 111 @versions/8.4.0/packages/pkg_schedule.sql 112 COMMIT; 106 113 107 114 -------------------------------------------------------------------------------- trunk/core/src/net/project/admin/RegistrationBean.java
r15475 r17725 953 953 954 954 try { 955 db.setQuery("select space_id from pn_invited_users where person_id =" + DBFormat.varchar2(userid));955 db.setQuery("select space_id, invitor_id from pn_invited_users where person_id =" + DBFormat.varchar2(userid)); 956 956 db.executeQuery(); 957 957 while (db.result.next()) { … … 969 969 // to the workspace 970 970 inviteAssignment.setObjectID(db.result.getString(1)); 971 // add the assignor 972 inviteAssignment.setAssignorID(db.result.getString(2)); 971 973 // hard coded to be status assigned; 972 974 inviteAssignment.setStatus(AssignmentStatus.ASSIGNED); trunk/core/src/net/project/calendar/AttendeeBean.java
r16593 r17725 41 41 public CalendarEvent m_event = null; 42 42 public String m_person_id = null; 43 public String m_host_id = null; 43 44 public String m_person_name = null; 44 45 public String m_comment = null; … … 47 48 public boolean m_isLoaded = false; 48 49 protected MeetingAssignment assignment = null; 49 protectedboolean isHost = false;50 // private boolean isHost = false; 50 51 private String m_person_email = null; 51 52 … … 74 75 public String getID() { 75 76 return m_person_id; 77 } 78 79 public String getHostID() { 80 return m_host_id; 76 81 } 77 82 … … 102 107 103 108 m_person_id = id; 109 } 110 111 public void setHostID(String hostID) { 112 this.m_host_id = hostID; 104 113 } 105 114 … … 452 461 m_status_id = null; 453 462 m_isLoaded = false; 454 isHost = false;463 // isHost = false; 455 464 this.assignment = null; 456 465 } … … 477 486 478 487 /** 479 * stores the assignment488 * stores the (new) assignment 480 489 * 481 490 * @exception PersistenceException … … 492 501 assignment.setPersonName(m_person_name); 493 502 494 if (isHost )503 if (isHost()) 495 504 assignment.setPersonRole(AttendeeStatus.HOST.getNameToken()); 496 505 else 497 506 assignment.setPersonRole(AttendeeStatus.INVITEE.getNameToken()); 498 507 //set the host of the meeting as assignor 508 assignment.setAssignorID(m_host_id); 499 509 assignment.setPrimaryOwner(false); 500 510 assignment.store(); 501 511 502 512 this.assignment = assignment; 513 } 514 515 private boolean isHost() { 516 if(m_person_id != null && m_host_id != null && m_person_id.equals(m_host_id)) 517 return true; 518 return false; 503 519 } 504 520 trunk/core/src/net/project/calendar/Meeting.java
r15828 r17725 680 680 attendee.setStatusID("20"); 681 681 attendee.setID(hostID); 682 attendee. isHost = true;682 attendee.setHostID(hostID); 683 683 684 684 addNewAttendees(attendee); trunk/core/src/net/project/form/assignment/FormAssignment.java
r17217 r17725 420 420 FormAssignment clone = new FormAssignment(); 421 421 clone.setPersonID(getPersonID()); 422 clone.setAssignorID(getAssignorID()); 422 423 clone.setObjectID(getObjectID()); 423 424 if (getPercentAssignedInt() >= 0) { trunk/core/src/net/project/form/assignment/mvc/handler/FormAssignmentHandler.java
r16614 r17725 51 51 String formDataName = request.getParameter("formDataName"); 52 52 53 User user = (User)getSessionVar("user"); 54 53 55 AssignmentManager assignmentManager = populateAssignmentManager(formDataID); 54 AssignmentRoster assignmentRoster = loadAssignmentRoster(formDataID );56 AssignmentRoster assignmentRoster = loadAssignmentRoster(formDataID, user); 55 57 Map assignmentsMap = assignmentManager.getAssignmentMap(); 56 58 List assignments = assignmentManager.getAssignments(); … … 61 63 if(!assignmentsMap.containsKey(person.getID())) { 62 64 FormAssignment unassignFormAssignment = FormAssignment.makeAssignmentFromRoster(formDataID, formDataName, assignmentRoster.getSpace().getID(), person); 65 //set the current user in session as assignor 66 unassignFormAssignment.setAssignorID(user.getID()); 63 67 assignments.add(unassignFormAssignment); 64 68 assignmentsMap.put(person.getID(), unassignFormAssignment); … … 85 89 } 86 90 87 private AssignmentRoster loadAssignmentRoster(String formDataID) throws PersistenceException { 88 User user = (User)getSessionVar("user"); 89 91 private AssignmentRoster loadAssignmentRoster(String formDataID, User user) throws PersistenceException { 90 92 //Determine if there are any overallocated resources 91 93 AssignmentRoster assignmentRoster = new AssignmentRoster(); trunk/core/src/net/project/hibernate/model/PnAssignment.hbm.xml
r17673 r17725 180 180 </many-to-one> 181 181 182 <!-- bi-directional many-to-one association to PnPerson --> 183 <many-to-one 184 name="pnAssignor" 185 class="net.project.hibernate.model.PnPerson" 186 update="false" 187 insert="false" 188 > 189 <column name="ASSIGNOR_ID" /> 190 </many-to-one> 191 182 192 <!-- end of derived association(s) --> 183 193 trunk/core/src/net/project/hibernate/model/PnAssignment.java
r17707 r17725 78 78 private net.project.hibernate.model.PnSpaceHasPerson pnSpaceHasPerson; 79 79 80 /** nullable persistent field */ 81 private net.project.hibernate.model.PnPerson pnAssignor; 82 80 83 private net.project.hibernate.model.PnTask pnTask; 81 84 … … 85 88 86 89 private net.project.hibernate.model.PnPerson pnPerson; 87 90 88 91 private String month; 89 92 90 93 private String personName; 91 94 92 95 private String taskName; 93 96 … … 101 104 102 105 /** full constructor */ 103 public PnAssignment(net.project.hibernate.model.PnAssignmentPK comp_id, int statusId, Integer percentAllocated, String role, int isPrimaryOwner, String recordStatus, Date startDate, Date endDate, Integer work, Integer workUnits, Integer workComplete, Integer workCompleteUnits, Date dateCreated, Date modifiedDate, Integer modifiedBy, Integer isComplete, Double percentComplete, Date actualStart, Date actualFinish, Date estimatedFinish, net.project.hibernate.model.PnObject pnObject, net.project.hibernate.model.PnSpaceHasPerson pnSpaceHasPerson) { 106 public PnAssignment( 107 net.project.hibernate.model.PnAssignmentPK comp_id, 108 int statusId, 109 Integer percentAllocated, 110 String role, 111 int isPrimaryOwner, 112 String recordStatus, 113 Date startDate, 114 Date endDate, 115 Integer work, 116 Integer workUnits, 117 Integer workComplete, 118 Integer workCompleteUnits, 119 Date dateCreated, 120 Date modifiedDate, 121 Integer modifiedBy, 122 Integer isComplete, 123 Double percentComplete, 124 Date actualStart, 125 Date actualFinish, 126 Date estimatedFinish, 127 net.project.hibernate.model.PnObject pnObject, 128 net.project.hibernate.model.PnSpaceHasPerson pnSpaceHasPerson, 129 net.project.hibernate.model.PnPerson pnAssignor) { 104 130 this.comp_id = comp_id; 105 131 this.statusId = statusId; … … 124 150 this.pnObject = pnObject; 125 151 this.pnSpaceHasPerson = pnSpaceHasPerson; 152 this.pnAssignor = pnAssignor; 126 153 } 127 154 … … 155 182 156 183 /*For View Summary Page ResourceTab*/ 157 public PnAssignment(String personName, Integer projectId, String projectName, String taskName, Integer percentComplete, String objectType, Integer work, Integer workComplete, Date startDate, Date endDate, Integer percentAllocated, Integer objectId){ 184 public PnAssignment( 185 String personName, 186 Integer projectId, 187 String projectName, 188 String taskName, 189 Integer percentComplete, 190 String objectType, 191 Integer work, 192 Integer workComplete, 193 Date startDate, 194 Date endDate, 195 Integer percentAllocated, 196 Integer objectId) { 158 197 this.personName = personName; 159 198 PnProjectSpace pnProjectSpace = new PnProjectSpace(projectId, projectName); … … 385 424 this.pnSpaceHasPerson = pnSpaceHasPerson; 386 425 } 426 427 public void setPnAssignor(net.project.hibernate.model.PnPerson pnAssignor) { 428 this.pnAssignor= pnAssignor; 429 } 430 431 public net.project.hibernate.model.PnPerson getPnAssignor() { 432 return this.pnAssignor; 433 } 387 434 388 435 public String toString() { 389 return new ToStringBuilder(this) 390 .append("comp_id", getComp_id()) 391 .toString(); 436 return new ToStringBuilder(this).append("comp_id", getComp_id()).toString(); 392 437 } 393 438 … … 396 441 if ( !(other instanceof PnAssignment) ) return false; 397 442 PnAssignment castOther = (PnAssignment) other; 398 return new EqualsBuilder() 399 .append(this.getComp_id(), castOther.getComp_id()) 400 .isEquals(); 443 return new EqualsBuilder().append(this.getComp_id(), castOther.getComp_id()).isEquals(); 401 444 } 402 445 403 446 public int hashCode() { 404 return new HashCodeBuilder() 405 .append(getComp_id()) 406 .toHashCode(); 407 } 408 409 /** 410 * @return Returns the pnTask. 411 */ 447 return new HashCodeBuilder().append(getComp_id()).toHashCode(); 448 } 449 450 /** 451 * @return Returns the pnTask. 452 */ 412 453 public net.project.hibernate.model.PnTask getPnTask() { 413 454 return pnTask; … … 431 472 * @param pnProjectSpace The pnProjectSpace to set. 432 473 */ 433 public void setPnProjectSpace( 434 net.project.hibernate.model.PnProjectSpace pnProjectSpace) { 435 this.pnProjectSpace = pnProjectSpace; 436 } 474 public void setPnProjectSpace(net.project.hibernate.model.PnProjectSpace pnProjectSpace) { 475 this.pnProjectSpace = pnProjectSpace; 476 } 437 477 438 478 /** … … 446 486 * @param pnSpaceHasSpace The pnSpaceHasSpace to set. 447 487 */ 448 public void setPnSpaceHasSpace( 449 net.project.hibernate.model.PnSpaceHasSpace pnSpaceHasSpace) { 488 public void setPnSpaceHasSpace(net.project.hibernate.model.PnSpaceHasSpace pnSpaceHasSpace) { 450 489 this.pnSpaceHasSpace = pnSpaceHasSpace; 451 490 } trunk/core/src/net/project/resource/ActivityAssignment.java
r17217 r17725 245 245 } else { 246 246 assert work != null && work.compareTo(TimeQuantity.O_HOURS) >= 0 : "Work cannot be negative or null"; 247 247 //owner is self 248 if(getAssignorID() == null) 249 setAssignorID(getPersonID()); 248 250 super.storeAssignment(db, startTime, endTime, startTime, endTime, null, work, work, new BigDecimal(1.00000)); 249 251 } … … 294 296 ActivityAssignment clone = new ActivityAssignment(); 295 297 clone.setPersonID(getPersonID()); 298 clone.setAssignorID(getAssignorID()); 296 299 clone.setObjectID(getObjectID()); 297 300 if (getPercentAssignedInt() >= 0) { trunk/core/src/net/project/resource/Assignment.java
r17673 r17725 89 89 */ 90 90 private String personId = null; 91 92 /** 93 * The ID of the person who assigned it. 94 */ 95 private String assignorId = null; 91 96 92 97 /** … … 108 113 */ 109 114 private String personName = null; 115 116 /** 117 * The display name of the person who assigned is. 118 */ 119 private String assignorName = null; 110 120 111 121 /** … … 200 210 public String getPersonID() { 201 211 return personId; 212 } 213 214 215 /** 216 * Sets the id of the person the assignment is owned by. 217 * 218 * @param id the person id 219 */ 220 public void setAssignorID(String id) { 221 assignorId = id; 222 } 223 224 225 /** 226 * Gets the id of the person the assignment is owned by. 227 * 228 * @return the person id 229 */ 230 public String getAssignorID() { 231 return assignorId; 202 232 } 203 233 … … 551 581 xml.append("<space_name>" + XMLUtils.escape(spaceName) + "</space_name>\n"); 552 582 xml.append("<person_name>" + XMLUtils.escape(personName) + "</person_name>\n"); 583 xml.append("<assignor_id>" + XMLUtils.escape(assignorId) + "</assignor_id>\n"); 584 xml.append("<assignor_name>" + XMLUtils.escape(assignorName) + "</assignor_name>\n"); 553 585 xml.append("<object_id>" + XMLUtils.escape(objectID) + "</object_id>\n"); 554 586 xml.append("<percent_assigned>" + XMLUtils.escape(String.valueOf(percentAssigned)) + "</percent_assigned>\n"); … … 594 626 int index = 0; 595 627 596 db.prepareCall("{call SCHEDULE.STORE_ASSIGNMENT(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? )}");628 db.prepareCall("{call SCHEDULE.STORE_ASSIGNMENT(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); 597 629 DatabaseUtils.setInteger(db.cstmt, ++index, spaceID); 598 630 DatabaseUtils.setInteger(db.cstmt, ++index, personId); … … 647 679 648 680 if (percentComplete != null) { 649 DatabaseUtils.setBigDecimal(db.cstmt, ++index, percentComplete);681 DatabaseUtils.setBigDecimal(db.cstmt, ++index, percentComplete); 650 682 } else { 651 683 db.cstmt.setInt(++index, 0); … … 654 686 DatabaseUtils.setInteger(db.cstmt, ++index, SessionManager.getUser().getID()); 655 687 db.cstmt.setString(++index, "A"); 688 DatabaseUtils.setInteger(db.cstmt, ++index, assignorId); 656 689 657 690 db.cstmt.registerOutParameter(++index, java.sql.Types.INTEGER); … … 718 751 public void load() throws PersistenceException, NullPointerException { 719 752 if (StringUtils.isEmpty(this.objectID)) { 720 LOGGER.error( 721 "Assignment.load() failed to find assignment because its ID is not emtpy or null."); 722 throw new NullPointerException( 723 "Assignment load operation failed; missing id"); 753 LOGGER.error("Assignment.load() failed to find assignment because its ID is not emtpy or null."); 754 throw new NullPointerException("Assignment load operation failed; missing id"); 724 755 } 725 756 final AssignmentFinder finder = new AssignmentFinder(); 726 final TextFilter objectIDFilter = new TextFilter("objectIDFilter", 727 AssignmentFinder.OBJECT_ID_COLUMN, false); 757 final TextFilter objectIDFilter = new TextFilter("objectIDFilter", AssignmentFinder.OBJECT_ID_COLUMN, false); 728 758 objectIDFilter.setSelected(true); 729 759 objectIDFilter.setComparator((TextComparator) TextComparator.EQUALS); … … 734 764 final Collection<Assignment> assignments = finder.findAll(); 735 765 if (CollectionUtils.isEmpty(assignments)) { 736 LOGGER.error( 737 "Assignment.load() failed to find assignment with id: " 738 + this.objectID); 739 throw new PersistenceException( 740 "No assignment exists with assignment id " + this.objectID); 766 LOGGER.error("Assignment.load() failed to find assignment with id: " + this.objectID); 767 throw new PersistenceException("No assignment exists with assignment id " + this.objectID); 741 768 } 742 769 Assignment assignment = assignments.iterator().next(); … … 752 779 this.personId = assignment.personId; 753 780 this.personName = assignment.personName; 781 this.assignorId = assignment.assignorId; 782 this.assignorName = assignment.assignorName; 754 783 this.primaryOwner = assignment.primaryOwner; 755 784 this.role = assignment.role; … … 795 824 target.personId = source.personId; 796 825 target.personName = source.personName; 826 target.assignorId = source.assignorId; 827 target.assignorName = source.assignorName; 797 828 target.primaryOwner = source.primaryOwner; 798 829 target.role = source.role; … … 855 886 void populate(ResultSet result) throws SQLException { 856 887 setPersonID(result.getString(AssignmentFinder.PERSON_ID_COL_ID)); 888 setAssignorID(result.getString(AssignmentFinder.ASSIGNOR_ID_COL_ID)); 857 889 setObjectID(result.getString(AssignmentFinder.OBJECT_ID_COL_ID)); 858 890 setStatus(AssignmentStatus.getForID(result.getString(AssignmentFinder.STATUS_ID_COL_ID))); … … 887 919 if (!(percentAssigned == assignment.percentAssigned)) return false; 888 920 if (personId != null ? !personId.equals(assignment.personId) : assignment.personId != null) return false; 921 if (assignorId != null ? !assignorId.equals(assignment.assignorId) : assignment.assignorId != null) return false; 889 922 if (primaryOwner != null ? !primaryOwner.equals(assignment.primaryOwner) : assignment.primaryOwner != null) return false; 890 923 if (role != null ? !role.equals(assignment.role) : assignment.role != null) return false; … … 898 931 int result; 899 932 result = (personId != null ? personId.hashCode() : 0); 933 result = 29* result + (assignorId != null ? assignorId.hashCode() : 0); 900 934 result = 29 * result + (spaceID != null ? spaceID.hashCode() : 0); 901 935 result = 29 * result + (objectID != null ? objectID.hashCode() : 0); trunk/core/src/net/project/resource/AssignmentFinder.java
r16593 r17725 47 47 48 48 public static ColumnDefinition PERSON_ID_COLUMN = new ColumnDefinition("a.person_id", ""); 49 public static ColumnDefinition ASSIGNOR_ID_COLUMN = new ColumnDefinition("a.assignor_id", ""); 49 50 public static ColumnDefinition OBJECT_ID_COLUMN = new ColumnDefinition("a.object_id", ""); 50 51 public static ColumnDefinition SPACE_ID_COLUMN = new ColumnDefinition("a.space_id", ""); … … 120 121 " a.is_complete, "+ 121 122 " a.person_id, "+ 123 " a.assignor_id, "+ 122 124 " a.percent_complete, "+ 123 125 " ob.object_type, "+ … … 176 178 public static int IS_COMPLETE_COL_ID = ++currentColID; 177 179 public static int PERSON_ID_COL_ID = ++currentColID; 180 public static int ASSIGNOR_ID_COL_ID = ++currentColID; 178 181 public static int PERCENT_COMPLETE_COL_ID = ++currentColID; 179 182 public static int OBJECT_TYPE_COL_ID = ++currentColID; trunk/core/src/net/project/resource/ScheduleEntryAssignment.java
r17217 r17725 597 597 ScheduleEntryAssignment clone = new ScheduleEntryAssignment(); 598 598 clone.setPersonID(getPersonID()); 599 clone.setAssignorID(getAssignorID()); 599 600 clone.setObjectID(getObjectID()); 600 601 if (getPercentAssignedInt() >= 0) { trunk/core/src/net/project/resource/SpaceInvitationProcessor.java
r15475 r17725 69 69 * will send notifications on invite. 70 70 */ 71 public SpaceInvitationProcessor(Space targetSpace, User invitingUser, 72 List inviteeList, SpaceInvitationManager.SpaceInvitationParameters parameters, 73 boolean notifyOnInvite) { 71 public SpaceInvitationProcessor(Space targetSpace, User invitingUser, List inviteeList, SpaceInvitationManager.SpaceInvitationParameters parameters, boolean notifyOnInvite) { 74 72 75 73 this.targetSpace = targetSpace; … … 603 601 // set object id of the space 604 602 inviteAssignment.setObjectID(getTargetSpace().getID()); 603 // set the assignor 604 inviteAssignment.setAssignorID(getInvitingUser() != null ? getInvitingUser().getID() : null); 605 605 // hard coded to be status assigned; 606 606 inviteAssignment.setStatus(parameters.isAutoAcceptInvite() ? AssignmentStatus.ACCEPTED : AssignmentStatus.ASSIGNED); trunk/core/src/net/project/schedule/mvc/handler/taskcalculate/AssignmentAddRemoveHandler.java
r16593 r17725 32 32 import net.project.schedule.calc.ScheduleEntryCalculator; 33 33 import net.project.schedule.calc.TaskCalculationType; 34 import net.project.security.User; 34 35 import net.project.util.ErrorReporter; 35 36 import net.project.util.Validator; … … 63 64 64 65 // Determine whether being added or removed 66 User user = (User)getSessionVar("user"); 65 67 String mode = request.getParameter("mode"); 66 68 if (Validator.isBlankOrNull(mode)) { … … 76 78 ScheduleEntryAssignment assignment = new ScheduleEntryAssignment(); 77 79 assignment.setPersonID(resourceID); 80 //set assignor to the user in session 81 assignment.setAssignorID(user.getID()); 78 82 assignment.setTimeZone(TimeZone.getTimeZone(timeZoneId)); 79 83 assignment.setObjectID(scheduleEntry.getID()); trunk/core/src/net/project/schedule/mvc/handler/tasklist/AssignResourcesDialogHandlerProcessing.java
r17673 r17725 239 239 String timeZoneId = (String) timeZones.get(nextResourceID); 240 240 // Schedule Entry does not have the resource. Create an assignment and add it 241 assignment = makeAssignment(nextResourceID, nextScheduleEntry, space );241 assignment = makeAssignment(nextResourceID, nextScheduleEntry, space, user); 242 242 assignment.setStatus(AssignmentStatus.ASSIGNED); 243 243 if(timeZoneId.equals("")) { … … 432 432 * @return the assignment 433 433 */ 434 private static ScheduleEntryAssignment makeAssignment(String resourceID, ScheduleEntry scheduleEntry, Space space ) {434 private static ScheduleEntryAssignment makeAssignment(String resourceID, ScheduleEntry scheduleEntry, Space space, User user) { 435 435 ScheduleEntryAssignment assignment = new ScheduleEntryAssignment(); 436 436 assignment.setPersonID(resourceID); 437 //set assignor to the user in session 438 assignment.setAssignorID(user.getID()); 437 439 assignment.setObjectID(scheduleEntry.getID()); 438 440 assignment.setSpaceID(space.getID()); trunk/core/src/net/project/security/SessionManager.java
r17190 r17725 317 317 * @return a <code>String</code> containing the name of default page name 318 318 */ 319 public static String getWikiDefaultRootPageName() {320 return Compatibility.getConfigurationProvider().getSetting("wikiRootPage");321 }319 // public static String getWikiDefaultRootPageName() { 320 // return Compatibility.getConfigurationProvider().getSetting("wikiRootPage"); 321 // } 322 322 323 323 /** trunk/core/src/net/project/view/pages/resource/management/DirectoryService.java
r17717 r17725 219 219 // COMMIT WORK 220 220 db.commit(); 221 addUserAssignment(newMember, space.getID() );221 addUserAssignment(newMember, space.getID(), invitor); 222 222 223 223 } else { … … 429 429 } 430 430 431 private void addUserAssignment(Person newMember, String spaceId ) throws PersistenceException {431 private void addUserAssignment(Person newMember, String spaceId, User invitor) throws PersistenceException { 432 432 433 433 // need to create an assignment for the invited … … 440 440 // set object id of the space 441 441 inviteAssignment.setObjectID(spaceId); 442 // set the assignor 443 inviteAssignment.setAssignorID(invitor != null ? invitor.getID() : null); 442 444 // hard coded to be status assigned; 443 445 inviteAssignment.setStatus(AssignmentStatus.ACCEPTED); trunk/core/web/jsp/calendar/MeetingAddAttendeesProcessing.jsp
r15404 r17725 44 44 int action = securityProvider.getCheckedActionID(); 45 45 46 if ((!id.equals(meeting.getID())) || 47 (action != net.project.security.Action.MODIFY) || 48 (module != net.project.base.Module.CALENDAR)) { 49 throw new net.project.security.AuthorizationFailedException(PropertyProvider.get("prm.calendar.security.validationfailed.message") 50 ); 46 if ((!id.equals(meeting.getID())) || (action != net.project.security.Action.MODIFY) || (module != net.project.base.Module.CALENDAR)) { 47 throw new net.project.security.AuthorizationFailedException(PropertyProvider.get("prm.calendar.security.validationfailed.message")); 51 48 } 52 49 … … 73 70 attendee.setComment(comment); 74 71 attendee.setID(personID[i]); 72 attendee.setHostID(meeting.getHostID()); 75 73 76 74 //Try to store this attendee trunk/core/web/jsp/calendar/MeetingAttendeeItemProcessing.jsp
r15404 r17725 50 50 int action = securityProvider.getCheckedActionID(); 51 51 52 if ((!id.equals(meeting.getID())) || 53 (action != net.project.security.Action.MODIFY) || 54 (module != net.project.base.Module.CALENDAR)) { 55 throw new net.project.security.AuthorizationFailedException(PropertyProvider.get("prm.calendar.security.validationfailed.message") 56 ); 52 if ((!id.equals(meeting.getID())) || (action != net.project.security.Action.MODIFY) || (module != net.project.base.Module.CALENDAR)) { 53 throw new net.project.security.AuthorizationFailedException(PropertyProvider.get("prm.calendar.security.validationfailed.message")); 57 54 } 58 55 … … 68 65 attendee.setStatusId(request.getParameter("statusId")); 69 66 attendee.setComment(request.getParameter("comment")); 70 67 attendee.setHostID(meeting.getHostID()); 71 68 attendee.store(); 72 69 } trunk/core/web/jsp/calendar/MeetingEditProcessing.jsp
r15404 r17725 123 123 AttendeeBean host = new AttendeeBean(); 124 124 host.setID(facility.getOwnerId()); 125 host.setHostID(facility.getOwnerId()); 125 126 host.setEvent(meeting); 126 127 host.load(); trunk/test/acceptance
- Property svn:ignore changed from
bin
to
bin
*
- Property svn:ignore changed from
trunk/test/unit-test
- Property svn:ignore changed from
mockobjects.properties
iim
bin
to
mockobjects.properties
iim
bin
test-report
*.properties
- Property svn:ignore changed from
