Changeset 17725

Show
Ignore:
Timestamp:
07/10/08 05:16:28 (6 months ago)
Author:
sjmittal
Message:

checking for integration of assignor fields for Assignments
schedule.bdy, schedule.spc, tables.sql, pkg_schedule.sql,prm_db_patch_8.4.0.sql,alter_pn_assignment.sql:
Added the assignor fields, constraints and indexes
PnAssignment?.hbm.xml, PnAssignment?.java: added the hibernate mapping for new field
Assignment.java, ActivityAssignment?.java, FormAssignment?.java, ScheduleEntryAssignment?.java:
made changes to java objects for new assignor field handling
AssignmentFinder?.java: made changes to base sql to include assignor fld
RegistrationBean?.java, SpaceInvitationProcessor?.java, DirectoryService?.java:
setting the invitor as assignor for space invitation kind of assignment
AttendeeBean?.java, Meeting.java: passing host of the meeting as assignor for meeting type of assignments
MeetingAddAttendeesProcessing?.jsp, MeetingAttendeeItemProcessing?.jsp:
setting hots to the attendee bean
AssignmentAddRemoveHandler?.java, AssignResourcesDialogHandlerProcessing?.java, FormAssignmentHandler?.java:
setting the user is session as assignor for task and form types of assignments

Files:

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
  • trunk/core/db/oracle/create-scripts/versions/8.4.0/new/packages/schedule.bdy

    r17524 r17725  
    553553    i_modified_by in NUMBER, 
    554554    i_record_status IN VARCHAR2, 
     555    i_assignor_id IN NUMBER, 
    555556    o_status OUT NUMBER 
    556557) 
     
    562563-- Robin       11-May-00  Changed error codes to coincide with new table. 
    563564-- Tim         10-Jul-01  Added due_datetime 
     565-- Sachin      07-Jul-08  Added assignor concept 
    564566IS 
    565567 
     
    601603 
    602604        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, 
    604606             is_primary_owner, start_date, end_date, actual_start, actual_finish, 
    605607             estimated_finish, work, work_units, work_complete, 
     
    607609             modified_date, record_status, date_created) 
    608610          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, 
    610612            i_primary_owner, i_start_date, i_end_date, i_actual_start, 
    611613            i_actual_finish, i_estimated_finish, i_work, i_work_units, 
     
    636638                  modified_by = i_modified_by, 
    637639                  modified_date = SYSDATE, 
    638                   record_status = i_record_status 
     640                  record_status = i_record_status, 
     641                  assignor_id = i_assignor_id 
    639642              WHERE space_id = i_space_id 
    640643                AND person_id = i_person_id 
  • trunk/core/db/oracle/create-scripts/versions/8.4.0/new/packages/schedule.spc

    r17524 r17725  
    3232    i_modified_by in NUMBER, 
    3333    i_record_status IN VARCHAR2, 
     34    i_assignor_id IN NUMBER, 
    3435    o_status OUT NUMBER 
    3536); 
  • trunk/core/db/oracle/create-scripts/versions/8.4.0/new/tables/tables.sql

    r17654 r17725  
    72037203create index TIMELOG_IDX1 on PN_TIMELOG (PERSON_ID); 
    72047204create index TIMELOG_IDX2 on PN_TIMELOG (OBJECT_ID); 
     7205 
     7206 
     7207prompt 
     7208prompt Adding more columns for PN_ASSIGNMENT.... 
     7209prompt ============================== 
     7210prompt 
     7211alter table PN_ASSIGNMENT 
     7212  add (ASSIGNOR_ID NUMBER(20)); 
     7213alter table PN_ASSIGNMENT 
     7214  add constraint ASSIGNMENT_FK3 foreign key (ASSIGNOR_ID) 
     7215  references PN_PERSON (PERSON_ID); 
     7216create 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  
    6060COMMIT; 
    6161 
     62PROMPT Executing alter_pn_assignment.sql 
     63@versions/8.4.0/tables/alter_pn_assignment.sql 
     64COMMIT; 
     65 
    6266PROMPT Executing cr_pn_weblog.sql 
    6367@versions/8.4.0/tables/cr_pn_weblog.sql 
     
    104108--COMMIT; 
    105109 
     110PROMPT Executing pkg_schedule.sql 
     111@versions/8.4.0/packages/pkg_schedule.sql 
     112COMMIT; 
    106113 
    107114-------------------------------------------------------------------------------- 
  • trunk/core/src/net/project/admin/RegistrationBean.java

    r15475 r17725  
    953953 
    954954        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)); 
    956956            db.executeQuery(); 
    957957            while (db.result.next()) { 
     
    969969                // to the workspace 
    970970                inviteAssignment.setObjectID(db.result.getString(1)); 
     971                // add the assignor 
     972                inviteAssignment.setAssignorID(db.result.getString(2)); 
    971973                // hard coded to be status assigned; 
    972974                inviteAssignment.setStatus(AssignmentStatus.ASSIGNED); 
  • trunk/core/src/net/project/calendar/AttendeeBean.java

    r16593 r17725  
    4141    public CalendarEvent m_event = null; 
    4242    public String m_person_id = null; 
     43    public String m_host_id = null; 
    4344    public String m_person_name = null; 
    4445    public String m_comment = null; 
     
    4748    public boolean m_isLoaded = false; 
    4849    protected MeetingAssignment assignment = null; 
    49     protected boolean isHost = false; 
     50//    private boolean isHost = false; 
    5051    private String m_person_email = null; 
    5152 
     
    7475    public String getID() { 
    7576        return m_person_id; 
     77    } 
     78     
     79    public String getHostID() { 
     80        return m_host_id; 
    7681    } 
    7782 
     
    102107 
    103108        m_person_id = id; 
     109    } 
     110     
     111    public void setHostID(String hostID) { 
     112        this.m_host_id = hostID; 
    104113    } 
    105114 
     
    452461        m_status_id = null; 
    453462        m_isLoaded = false; 
    454         isHost = false; 
     463//        isHost = false; 
    455464        this.assignment = null; 
    456465    } 
     
    477486 
    478487    /** 
    479      * stores the assignment 
     488     * stores the (new) assignment 
    480489     * 
    481490     * @exception PersistenceException 
     
    492501        assignment.setPersonName(m_person_name); 
    493502 
    494         if (isHost
     503        if (isHost()
    495504            assignment.setPersonRole(AttendeeStatus.HOST.getNameToken()); 
    496505        else 
    497506            assignment.setPersonRole(AttendeeStatus.INVITEE.getNameToken()); 
    498  
     507        //set the host of the meeting as assignor 
     508        assignment.setAssignorID(m_host_id); 
    499509        assignment.setPrimaryOwner(false); 
    500510        assignment.store(); 
    501511 
    502512        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; 
    503519    } 
    504520 
  • trunk/core/src/net/project/calendar/Meeting.java

    r15828 r17725  
    680680        attendee.setStatusID("20"); 
    681681        attendee.setID(hostID); 
    682         attendee.isHost = true
     682        attendee.setHostID(hostID)
    683683 
    684684        addNewAttendees(attendee); 
  • trunk/core/src/net/project/form/assignment/FormAssignment.java

    r17217 r17725  
    420420        FormAssignment clone = new FormAssignment(); 
    421421        clone.setPersonID(getPersonID()); 
     422        clone.setAssignorID(getAssignorID()); 
    422423        clone.setObjectID(getObjectID()); 
    423424        if (getPercentAssignedInt() >= 0) { 
  • trunk/core/src/net/project/form/assignment/mvc/handler/FormAssignmentHandler.java

    r16614 r17725  
    5151        String formDataName = request.getParameter("formDataName"); 
    5252         
     53        User user = (User)getSessionVar("user"); 
     54         
    5355        AssignmentManager assignmentManager = populateAssignmentManager(formDataID); 
    54         AssignmentRoster assignmentRoster = loadAssignmentRoster(formDataID); 
     56        AssignmentRoster assignmentRoster = loadAssignmentRoster(formDataID, user); 
    5557        Map assignmentsMap = assignmentManager.getAssignmentMap(); 
    5658        List assignments = assignmentManager.getAssignments(); 
     
    6163            if(!assignmentsMap.containsKey(person.getID())) { 
    6264                FormAssignment unassignFormAssignment = FormAssignment.makeAssignmentFromRoster(formDataID, formDataName, assignmentRoster.getSpace().getID(), person); 
     65                //set the current user in session as assignor 
     66                unassignFormAssignment.setAssignorID(user.getID()); 
    6367                assignments.add(unassignFormAssignment); 
    6468                assignmentsMap.put(person.getID(), unassignFormAssignment); 
     
    8589    } 
    8690 
    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 { 
    9092        //Determine if there are any overallocated resources 
    9193        AssignmentRoster assignmentRoster = new AssignmentRoster(); 
  • trunk/core/src/net/project/hibernate/model/PnAssignment.hbm.xml

    r17673 r17725  
    180180        </many-to-one> 
    181181         
     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         
    182192    <!-- end of derived association(s) --> 
    183193   
  • trunk/core/src/net/project/hibernate/model/PnAssignment.java

    r17707 r17725  
    7878    private net.project.hibernate.model.PnSpaceHasPerson pnSpaceHasPerson; 
    7979     
     80    /** nullable persistent field */ 
     81    private net.project.hibernate.model.PnPerson pnAssignor; 
     82     
    8083    private net.project.hibernate.model.PnTask pnTask; 
    8184     
     
    8588     
    8689    private net.project.hibernate.model.PnPerson pnPerson; 
    87  
     90     
    8891        private String month; 
    8992         
    9093        private String personName;       
    91          
     94     
    9295        private String taskName; 
    9396         
     
    101104 
    102105    /** 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) { 
    104130        this.comp_id = comp_id; 
    105131        this.statusId = statusId; 
     
    124150        this.pnObject = pnObject; 
    125151        this.pnSpaceHasPerson = pnSpaceHasPerson; 
     152        this.pnAssignor = pnAssignor; 
    126153    } 
    127154 
     
    155182     
    156183    /*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) { 
    158197        this.personName = personName; 
    159198        PnProjectSpace pnProjectSpace = new PnProjectSpace(projectId, projectName); 
     
    385424        this.pnSpaceHasPerson = pnSpaceHasPerson; 
    386425    } 
     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    } 
    387434 
    388435    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(); 
    392437    } 
    393438 
     
    396441        if ( !(other instanceof PnAssignment) ) return false; 
    397442        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(); 
    401444    } 
    402445 
    403446    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     */ 
    412453        public net.project.hibernate.model.PnTask getPnTask() { 
    413454                return pnTask; 
     
    431472         * @param pnProjectSpace The pnProjectSpace to set. 
    432473         */ 
    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    } 
    437477 
    438478        /** 
     
    446486         * @param pnSpaceHasSpace The pnSpaceHasSpace to set. 
    447487         */ 
    448         public void setPnSpaceHasSpace( 
    449                         net.project.hibernate.model.PnSpaceHasSpace pnSpaceHasSpace) { 
     488        public void setPnSpaceHasSpace(net.project.hibernate.model.PnSpaceHasSpace pnSpaceHasSpace) { 
    450489                this.pnSpaceHasSpace = pnSpaceHasSpace; 
    451490        } 
  • trunk/core/src/net/project/resource/ActivityAssignment.java

    r17217 r17725  
    245245        } else { 
    246246            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()); 
    248250            super.storeAssignment(db, startTime, endTime, startTime, endTime, null, work, work, new BigDecimal(1.00000)); 
    249251        } 
     
    294296        ActivityAssignment clone = new ActivityAssignment(); 
    295297        clone.setPersonID(getPersonID()); 
     298        clone.setAssignorID(getAssignorID()); 
    296299        clone.setObjectID(getObjectID()); 
    297300        if (getPercentAssignedInt() >= 0) { 
  • trunk/core/src/net/project/resource/Assignment.java

    r17673 r17725  
    8989     */ 
    9090    private String personId = null; 
     91     
     92    /** 
     93     * The ID of the person who assigned it. 
     94     */ 
     95    private String assignorId = null; 
    9196 
    9297    /** 
     
    108113     */ 
    109114    private String personName = null; 
     115     
     116    /** 
     117     * The display name of the person who assigned is. 
     118     */ 
     119    private String assignorName = null; 
    110120 
    111121    /** 
     
    200210    public String getPersonID() { 
    201211        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; 
    202232    } 
    203233 
     
    551581        xml.append("<space_name>" + XMLUtils.escape(spaceName) + "</space_name>\n"); 
    552582        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"); 
    553585        xml.append("<object_id>" + XMLUtils.escape(objectID) + "</object_id>\n"); 
    554586        xml.append("<percent_assigned>" + XMLUtils.escape(String.valueOf(percentAssigned)) + "</percent_assigned>\n"); 
     
    594626            int index = 0; 
    595627 
    596             db.prepareCall("{call SCHEDULE.STORE_ASSIGNMENT(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); 
     628            db.prepareCall("{call SCHEDULE.STORE_ASSIGNMENT(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); 
    597629            DatabaseUtils.setInteger(db.cstmt, ++index, spaceID); 
    598630            DatabaseUtils.setInteger(db.cstmt, ++index, personId); 
     
    647679 
    648680            if (percentComplete != null) { 
    649                     DatabaseUtils.setBigDecimal(db.cstmt, ++index, percentComplete); 
     681                DatabaseUtils.setBigDecimal(db.cstmt, ++index, percentComplete); 
    650682            } else { 
    651683                db.cstmt.setInt(++index, 0); 
     
    654686            DatabaseUtils.setInteger(db.cstmt, ++index, SessionManager.getUser().getID());           
    655687            db.cstmt.setString(++index, "A"); 
     688            DatabaseUtils.setInteger(db.cstmt, ++index, assignorId); 
    656689 
    657690            db.cstmt.registerOutParameter(++index, java.sql.Types.INTEGER); 
     
    718751    public void load() throws PersistenceException, NullPointerException { 
    719752        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"); 
    724755        } 
    725756        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); 
    728758        objectIDFilter.setSelected(true); 
    729759        objectIDFilter.setComparator((TextComparator) TextComparator.EQUALS); 
     
    734764        final Collection<Assignment> assignments = finder.findAll(); 
    735765        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); 
    741768        } 
    742769        Assignment assignment = assignments.iterator().next(); 
     
    752779        this.personId = assignment.personId; 
    753780        this.personName = assignment.personName; 
     781        this.assignorId = assignment.assignorId; 
     782        this.assignorName = assignment.assignorName; 
    754783        this.primaryOwner = assignment.primaryOwner; 
    755784        this.role = assignment.role; 
     
    795824        target.personId = source.personId; 
    796825        target.personName = source.personName; 
     826        target.assignorId = source.assignorId; 
     827        target.assignorName = source.assignorName; 
    797828        target.primaryOwner = source.primaryOwner; 
    798829        target.role = source.role; 
     
    855886    void populate(ResultSet result) throws SQLException { 
    856887        setPersonID(result.getString(AssignmentFinder.PERSON_ID_COL_ID)); 
     888        setAssignorID(result.getString(AssignmentFinder.ASSIGNOR_ID_COL_ID)); 
    857889        setObjectID(result.getString(AssignmentFinder.OBJECT_ID_COL_ID)); 
    858890        setStatus(AssignmentStatus.getForID(result.getString(AssignmentFinder.STATUS_ID_COL_ID))); 
     
    887919        if (!(percentAssigned == assignment.percentAssigned)) return false; 
    888920        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;         
    889922        if (primaryOwner != null ? !primaryOwner.equals(assignment.primaryOwner) : assignment.primaryOwner != null) return false; 
    890923        if (role != null ? !role.equals(assignment.role) : assignment.role != null) return false; 
     
    898931        int result; 
    899932        result = (personId != null ? personId.hashCode() : 0); 
     933        result = 29* result + (assignorId != null ? assignorId.hashCode() : 0); 
    900934        result = 29 * result + (spaceID != null ? spaceID.hashCode() : 0); 
    901935        result = 29 * result + (objectID != null ? objectID.hashCode() : 0); 
  • trunk/core/src/net/project/resource/AssignmentFinder.java

    r16593 r17725  
    4747         
    4848        public static ColumnDefinition PERSON_ID_COLUMN = new ColumnDefinition("a.person_id", ""); 
     49    public static ColumnDefinition ASSIGNOR_ID_COLUMN = new ColumnDefinition("a.assignor_id", "");     
    4950        public static ColumnDefinition OBJECT_ID_COLUMN = new ColumnDefinition("a.object_id", ""); 
    5051        public static ColumnDefinition SPACE_ID_COLUMN = new ColumnDefinition("a.space_id", ""); 
     
    120121        "  a.is_complete, "+ 
    121122        "  a.person_id, "+ 
     123        "  a.assignor_id, "+ 
    122124        "  a.percent_complete, "+ 
    123125        "  ob.object_type, "+ 
     
    176178        public static int IS_COMPLETE_COL_ID = ++currentColID; 
    177179        public static int PERSON_ID_COL_ID = ++currentColID; 
     180    public static int ASSIGNOR_ID_COL_ID = ++currentColID;     
    178181        public static int PERCENT_COMPLETE_COL_ID = ++currentColID; 
    179182        public static int OBJECT_TYPE_COL_ID = ++currentColID; 
  • trunk/core/src/net/project/resource/ScheduleEntryAssignment.java

    r17217 r17725  
    597597        ScheduleEntryAssignment clone = new ScheduleEntryAssignment(); 
    598598        clone.setPersonID(getPersonID()); 
     599        clone.setAssignorID(getAssignorID()); 
    599600        clone.setObjectID(getObjectID()); 
    600601        if (getPercentAssignedInt() >= 0) { 
  • trunk/core/src/net/project/resource/SpaceInvitationProcessor.java

    r15475 r17725  
    6969     * will send notifications on invite. 
    7070     */ 
    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) { 
    7472 
    7573        this.targetSpace = targetSpace; 
     
    603601        // set object id of the space 
    604602        inviteAssignment.setObjectID(getTargetSpace().getID()); 
     603        // set the assignor 
     604        inviteAssignment.setAssignorID(getInvitingUser() != null ? getInvitingUser().getID() : null); 
    605605        // hard coded to be status assigned; 
    606606        inviteAssignment.setStatus(parameters.isAutoAcceptInvite() ? AssignmentStatus.ACCEPTED : AssignmentStatus.ASSIGNED); 
  • trunk/core/src/net/project/schedule/mvc/handler/taskcalculate/AssignmentAddRemoveHandler.java

    r16593 r17725  
    3232import net.project.schedule.calc.ScheduleEntryCalculator; 
    3333import net.project.schedule.calc.TaskCalculationType; 
     34import net.project.security.User; 
    3435import net.project.util.ErrorReporter; 
    3536import net.project.util.Validator; 
     
    6364 
    6465        // Determine whether being added or removed 
     66        User user = (User)getSessionVar("user"); 
    6567        String mode = request.getParameter("mode"); 
    6668        if (Validator.isBlankOrNull(mode)) { 
     
    7678            ScheduleEntryAssignment assignment = new ScheduleEntryAssignment(); 
    7779            assignment.setPersonID(resourceID); 
     80            //set assignor to the user in session             
     81            assignment.setAssignorID(user.getID()); 
    7882            assignment.setTimeZone(TimeZone.getTimeZone(timeZoneId)); 
    7983            assignment.setObjectID(scheduleEntry.getID()); 
  • trunk/core/src/net/project/schedule/mvc/handler/tasklist/AssignResourcesDialogHandlerProcessing.java

    r17673 r17725  
    239239                        String timeZoneId = (String) timeZones.get(nextResourceID); 
    240240                        // 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); 
    242242                        assignment.setStatus(AssignmentStatus.ASSIGNED); 
    243243                        if(timeZoneId.equals("")) { 
     
    432432     * @return the assignment 
    433433     */ 
    434     private static ScheduleEntryAssignment makeAssignment(String resourceID, ScheduleEntry scheduleEntry, Space space) { 
     434    private static ScheduleEntryAssignment makeAssignment(String resourceID, ScheduleEntry scheduleEntry, Space space, User user) { 
    435435        ScheduleEntryAssignment assignment = new ScheduleEntryAssignment(); 
    436436        assignment.setPersonID(resourceID); 
     437        //set assignor to the user in session 
     438        assignment.setAssignorID(user.getID()); 
    437439        assignment.setObjectID(scheduleEntry.getID()); 
    438440        assignment.setSpaceID(space.getID()); 
  • trunk/core/src/net/project/security/SessionManager.java

    r17190 r17725  
    317317     * @return a <code>String</code> containing the name of default page name 
    318318     */ 
    319     public static String getWikiDefaultRootPageName() { 
    320         return Compatibility.getConfigurationProvider().getSetting("wikiRootPage"); 
    321     } 
     319//    public static String getWikiDefaultRootPageName() { 
     320//        return Compatibility.getConfigurationProvider().getSetting("wikiRootPage"); 
     321//    } 
    322322 
    323323    /** 
  • trunk/core/src/net/project/view/pages/resource/management/DirectoryService.java

    r17717 r17725  
    219219                                // COMMIT WORK 
    220220                                db.commit(); 
    221                                 addUserAssignment(newMember, space.getID()); 
     221                                addUserAssignment(newMember, space.getID(), invitor); 
    222222 
    223223                        } else { 
     
    429429        } 
    430430 
    431         private void addUserAssignment(Person newMember, String spaceId) throws PersistenceException { 
     431        private void addUserAssignment(Person newMember, String spaceId, User invitor) throws PersistenceException { 
    432432 
    433433                // need to create an assignment for the invited 
     
    440440                // set object id of the space 
    441441                inviteAssignment.setObjectID(spaceId); 
     442        // set the assignor 
     443        inviteAssignment.setAssignorID(invitor != null ? invitor.getID() : null); 
    442444                // hard coded to be status assigned; 
    443445                inviteAssignment.setStatus(AssignmentStatus.ACCEPTED); 
  • trunk/core/web/jsp/calendar/MeetingAddAttendeesProcessing.jsp

    r15404 r17725  
    4444    int action = securityProvider.getCheckedActionID(); 
    4545 
    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")); 
    5148    } 
    5249 
     
    7370            attendee.setComment(comment); 
    7471            attendee.setID(personID[i]); 
     72            attendee.setHostID(meeting.getHostID()); 
    7573 
    7674            //Try to store this attendee 
  • trunk/core/web/jsp/calendar/MeetingAttendeeItemProcessing.jsp

    r15404 r17725  
    5050    int action = securityProvider.getCheckedActionID(); 
    5151 
    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")); 
    5754    } 
    5855 
     
    6865        attendee.setStatusId(request.getParameter("statusId")); 
    6966        attendee.setComment(request.getParameter("comment")); 
    70      
     67        attendee.setHostID(meeting.getHostID()); 
    7168        attendee.store(); 
    7269    } 
  • trunk/core/web/jsp/calendar/MeetingEditProcessing.jsp

    r15404 r17725  
    123123        AttendeeBean host = new AttendeeBean(); 
    124124        host.setID(facility.getOwnerId()); 
     125        host.setHostID(facility.getOwnerId()); 
    125126        host.setEvent(meeting); 
    126127        host.load(); 
  • trunk/test/acceptance

    • Property svn:ignore changed from
      bin
      to
      bin
      *
  • trunk/test/unit-test

    • Property svn:ignore changed from
      mockobjects.properties
      iim
      bin
      to
      mockobjects.properties
      iim
      bin
      test-report
      *.properties