File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/projects/detail/components Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,14 @@ class CreatePhaseForm extends React.Component {
120120
121121 const phaseData = {
122122 title : model . title ,
123- description : model . description || ' ' ,
124123 startDate : moment ( model . startDate ) ,
125124 endDate : moment ( model . endDate ) ,
126125 }
127126
127+ if ( model . description . trim ( ) ) {
128+ phaseData . description = model . description
129+ }
130+
128131 const apiMilestones = milestones . map ( ( milestone , index ) => ( {
129132 // default values
130133 ...MILESTONE_DEFAULT_VALUES [ milestone . type ] ,
Original file line number Diff line number Diff line change @@ -86,8 +86,10 @@ class EditStageForm extends React.Component {
8686 if ( publishClicked && phase . status === PHASE_STATUS_DRAFT ) {
8787 newStatus = PHASE_STATUS_ACTIVE
8888 }
89+ if ( ! model . description . trim ( ) ) {
90+ delete model . description
91+ }
8992 const updateParam = _ . assign ( { } , model , {
90- description : model . description || ' ' ,
9193 startDate : updatedStartDate ,
9294 endDate : updatedEndDate || '' ,
9395 status : newStatus
@@ -285,7 +287,7 @@ class EditStageForm extends React.Component {
285287 wrapperClass = { `${ styles [ 'input-row' ] } ` }
286288 label = "Description"
287289 name = "description"
288- value = { phase . description ? phase . description . trim ( ) : '' }
290+ value = { phase . description }
289291 maxLength = { 255 }
290292 />
291293 < label styleName = "description-sub-label" > 255 character maximum</ label >
You can’t perform that action at this time.
0 commit comments