mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: use source milestone
This commit is contained in:
		
							parent
							
								
									dc5d7a89b3
								
							
						
					
					
						commit
						2330ae9532
					
				| @ -54,12 +54,7 @@ const getMilestonesWithAutomation = ( | ||||
|                     change.action === 'createMilestoneProgression' || | ||||
|                     change.action === 'updateMilestoneProgression', | ||||
|             ) | ||||
|             .map((change) => | ||||
|                 change.action === 'createMilestoneProgression' | ||||
|                     ? change.payload.sourceMilestone | ||||
|                     : change.payload.sourceMilestoneId || | ||||
|                       change.payload.sourceMilestone, | ||||
|             ) | ||||
|             .map((change) => change.payload.sourceMilestone) | ||||
|             .filter((id): id is string => Boolean(id)), | ||||
|     ); | ||||
| }; | ||||
| @ -70,11 +65,7 @@ const getMilestonesWithDeletedAutomation = ( | ||||
|     return new Set( | ||||
|         progressionChanges | ||||
|             .filter((change) => change.action === 'deleteMilestoneProgression') | ||||
|             .map( | ||||
|                 (change) => | ||||
|                     change.payload.sourceMilestoneId || | ||||
|                     change.payload.sourceMilestone, | ||||
|             ) | ||||
|             .map((change) => change.payload.sourceMilestone) | ||||
|             .filter((id): id is string => Boolean(id)), | ||||
|     ); | ||||
| }; | ||||
| @ -84,11 +75,7 @@ const getChangeDescriptions = ( | ||||
|     basePlan: IReleasePlan, | ||||
| ): string[] => { | ||||
|     return progressionChanges.map((change) => { | ||||
|         const sourceId = | ||||
|             change.action === 'createMilestoneProgression' | ||||
|                 ? change.payload.sourceMilestone | ||||
|                 : change.payload.sourceMilestoneId || | ||||
|                   change.payload.sourceMilestone; | ||||
|         const sourceId = change.payload.sourceMilestone; | ||||
|         const sourceName = | ||||
|             basePlan.milestones.find((milestone) => milestone.id === sourceId) | ||||
|                 ?.name || sourceId; | ||||
|  | ||||
| @ -51,10 +51,7 @@ export const ProgressionChange: FC<ProgressionChangeProps> = ({ | ||||
|     if (!basePlan) return null; | ||||
| 
 | ||||
|     const isCreate = change.action === 'createMilestoneProgression'; | ||||
| 
 | ||||
|     const sourceId = isCreate | ||||
|         ? change.payload.sourceMilestone | ||||
|         : change.payload.sourceMilestoneId || change.payload.sourceMilestone; | ||||
|     const sourceId = change.payload.sourceMilestone; | ||||
| 
 | ||||
|     if (!sourceId) return null; | ||||
| 
 | ||||
|  | ||||
| @ -25,14 +25,12 @@ export const applyProgressionChanges = ( | ||||
|             const updateChange = progressionChanges.find( | ||||
|                 (change): change is IChangeRequestUpdateMilestoneProgression => | ||||
|                     change.action === 'updateMilestoneProgression' && | ||||
|                     (change.payload.sourceMilestoneId === milestone.id || | ||||
|                         change.payload.sourceMilestone === milestone.id), | ||||
|                     change.payload.sourceMilestone === milestone.id, | ||||
|             ); | ||||
|             const deleteChange = progressionChanges.find( | ||||
|                 (change): change is IChangeRequestDeleteMilestoneProgression => | ||||
|                     change.action === 'deleteMilestoneProgression' && | ||||
|                     (change.payload.sourceMilestoneId === milestone.id || | ||||
|                         change.payload.sourceMilestone === milestone.id), | ||||
|                     change.payload.sourceMilestone === milestone.id, | ||||
|             ); | ||||
| 
 | ||||
|             if (deleteChange) { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user