Changeset 20514

Show
Ignore:
Timestamp:
03/02/10 08:16:00 (5 months ago)
Author:
nilesh
Message:

changes for providing configuration for warning messages and work capture to an un-assigned task.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/core/src/net/project/schedule/Schedule.java

    r20220 r20514  
    268268    /** Indicates if this schedule is being shared by any other projects. */ 
    269269    private boolean isShared = false; 
     270    private boolean editingWarning = true; 
     271    private boolean unAssignedWorkcapture = true; 
    270272 
    271273    /** 
     
    313315        startConstraintDate = null; 
    314316        predecessorList = new PredecessorList(); 
     317        editingWarning = true; 
     318        unAssignedWorkcapture = true; 
    315319    } 
    316320 
     
    15311535        } 
    15321536 
    1533         db.prepareCall("{call SCHEDULE.STORE_PLAN(?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?)}"); 
     1537        db.prepareCall("{call SCHEDULE.STORE_PLAN(?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)}"); 
    15341538 
    15351539        int index = 0; 
     
    15521556        db.cstmt.setString(++index, startConstraint.getID()); 
    15531557        DatabaseUtils.setTimestamp(db.cstmt, ++index, startConstraintDate); 
    1554  
     1558        db.cstmt.setBoolean(++index, editingWarning); 
     1559        db.cstmt.setBoolean(++index, unAssignedWorkcapture); 
     1560         
    15551561        db.cstmt.registerOutParameter((idIndex = ++index), Types.NUMERIC); 
    15561562        DatabaseUtils.setInteger(db.cstmt, idIndex, getID()); 
     
    16141620            "    p.default_calendar_id, p.timezone_id, shp.space_id, p.default_task_calc_type_id, " + 
    16151621            "    p.earliest_start_date, p.earliest_finish_date, p.latest_start_date, " + 
    1616             "    p.latest_finish_date, p.constraint_type_id, p.constraint_date, SYSDATE " + 
     1622            "    p.latest_finish_date, p.constraint_type_id, p.constraint_date, SYSDATE, inline_editing_warning, un_assigned_workcapture " + 
    16171623            "from " + 
    16181624            "    pn_space_has_plan shp, " + 
     
    16451651        int CONSTRAINT_DATE_COL = colID++; 
    16461652        int LOAD_TIME_COL = colID++; 
     1653        int EDITING_WARNING_COL = colID++; 
     1654        int UN_ASSIGNED_WORKCAPTURE_COL = colID++; 
    16471655 
    16481656 
     
    16721680            startConstraint = TaskConstraintType.getForID(db.result.getString(CONSTRAINT_TYPE_ID_COL)); 
    16731681            startConstraintDate = DatabaseUtils.getTimestamp(db.result, CONSTRAINT_DATE_COL); 
     1682            editingWarning = db.result.getBoolean(EDITING_WARNING_COL); 
     1683            unAssignedWorkcapture = db.result.getBoolean(UN_ASSIGNED_WORKCAPTURE_COL); 
    16741684 
    16751685            String timeZoneID = db.result.getString(TIMEZONE_ID_COL); 
     
    25222532        clone.isShared = this.isShared; 
    25232533        clone.latestFinishDate = this.latestFinishDate; 
     2534        clone.editingWarning = this.editingWarning; 
     2535        clone.unAssignedWorkcapture = this.unAssignedWorkcapture; 
    25242536        //Make copies of all the entries in the entry map 
    25252537        Map clonedEntryMap = new LinkedHashMap(); 
     
    26352647        return getTaskList().first() == null ? "" : getTaskList().first().getID(); 
    26362648    } 
     2649 
     2650        /** 
     2651         * @return the unAssignedWorkcapture 
     2652         */ 
     2653        public boolean isUnAssignedWorkcapture() { 
     2654                return unAssignedWorkcapture; 
     2655        } 
     2656 
     2657        /** 
     2658         * @param unAssignedWorkcapture the unAssignedWorkcapture to set 
     2659         */ 
     2660        public void setUnAssignedWorkcapture(boolean unAssignedWorkcapture) { 
     2661                this.unAssignedWorkcapture = unAssignedWorkcapture; 
     2662        } 
     2663 
     2664        /** 
     2665         * @return the editingWarning 
     2666         */ 
     2667        public boolean isEditingWarning() { 
     2668                return editingWarning; 
     2669        } 
     2670 
     2671        /** 
     2672         * @param editingWarning the editingWarning to set 
     2673         */ 
     2674        public void setEditingWarning(boolean editingWarning) { 
     2675                this.editingWarning = editingWarning; 
     2676        } 
    26372677     
    26382678} 
  • trunk/core/src/net/project/schedule/SchedulePropertiesHelper.java

    r18397 r20514  
    5050    private TaskCalculationType defaultTaskCalculationType; 
    5151    private List scheduleDependencies = new ArrayList(); 
     52    private boolean editingWarning; 
     53    private boolean unAssignedWorkcapture; 
    5254 
    5355    /** 
     
    9395        this.isAutoCalculateTaskEndpoints = schedule.isAutocalculateTaskEndpoints(); 
    9496        this.defaultTaskCalculationType = schedule.getDefaultTaskCalculationType(); 
     97        this.editingWarning = schedule.isEditingWarning(); 
     98        this.unAssignedWorkcapture = schedule.isUnAssignedWorkcapture(); 
    9599    } 
    96100 
     
    248252        return scheduleDependencies; 
    249253    } 
     254     
     255    /** 
     256     * Returns the "checked" attribute based on the autocalculation setting 
     257     * @return the string "checked" if auto calculate is on; 
     258     * otherwise empty string 
     259     */ 
     260    public String getCheckedEditingWarning() { 
     261        return (this.editingWarning ? "checked" : ""); 
     262    } 
     263     
     264    /** 
     265     * Returns the "checked" attribute based on the autocalculation setting 
     266     * @return the string "checked" if auto calculate is on; 
     267     * otherwise empty string 
     268     */ 
     269    public String getCheckedUnAssignedWorkcapture() { 
     270        return (this.unAssignedWorkcapture ? "checked" : ""); 
     271    } 
    250272 
    251273} 
  • trunk/core/web/jsp/schedule/properties/ScheduleProperties.jsp

    r20021 r20514  
    275275    </td> 
    276276</tr> 
     277<%-- enable inline editing warning message checkbox --%> 
     278<tr> 
     279    <td colspan="2" class="tableContent"> 
     280        <label> 
     281        <input type="checkbox" name="editingWarning" value="true" <jsp:getProperty name="schedulePropertiesHelper" property="checkedEditingWarning" />> 
     282        <display:get name="prm.schedule.properties.inlineeditwarning.label"/> 
     283        </label> 
     284    </td> 
     285</tr> 
     286<%-- Enable Un-assigned task work capture --%> 
     287<tr> 
     288    <td colspan="2" class="tableContent"> 
     289        <label> 
     290        <input type="checkbox" name="unAssignedWorkcapture" value="true" <jsp:getProperty name="schedulePropertiesHelper" property="checkedUnAssignedWorkcapture" />> 
     291        <display:get name="prm.schedule.properties.unassignedworkcapture.label"/> 
     292        </label> 
     293    </td> 
     294</tr> 
    277295</table> 
    278296 
  • trunk/core/web/jsp/schedule/properties/SchedulePropertiesProcessing.jsp

    r19063 r20514  
    107107    TaskCalculationType taskCalculationType = TaskCalculationType.makeFromComponents(TaskCalculationType.FixedElement.forID(defaultTaskCalculationTypeFixedElementID), isNewTaskEffortDriven); 
    108108    TaskConstraintType startConstraintType = TaskConstraintType.getForID(request.getParameter("scheduleStartConstraint")); 
    109  
     109        boolean inlineEditingWarning = "true".equals(request.getParameter("editingWarning")); 
     110        boolean unAssignedWorkcapture = "true".equals(request.getParameter("unAssignedWorkcapture")); 
    110111    if (!errorReporter.errorsFound()) { 
    111112        if (!Validator.isBlankOrNull(onlyshiftworkplan) && onlyshiftworkplan.equals("true")) { 
     
    120121            schedule.setDefaultTaskCalculationType(taskCalculationType); 
    121122            schedule.setStartConstraint(startConstraintType); 
    122  
     123            schedule.setEditingWarning(inlineEditingWarning); 
     124            schedule.setUnAssignedWorkcapture(unAssignedWorkcapture); 
     125             
    123126            schedule.store(); 
    124127