diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/work_items/components/work_item_milestone.vue | 9 | ||||
-rw-r--r-- | app/services/projects/destroy_service.rb | 2 | ||||
-rw-r--r-- | app/services/projects/unlink_fork_service.rb | 6 |
3 files changed, 7 insertions, 10 deletions
diff --git a/app/assets/javascripts/work_items/components/work_item_milestone.vue b/app/assets/javascripts/work_items/components/work_item_milestone.vue index 9c6fa158169..dbeb3d4d3ff 100644 --- a/app/assets/javascripts/work_items/components/work_item_milestone.vue +++ b/app/assets/javascripts/work_items/components/work_item_milestone.vue @@ -47,7 +47,7 @@ export default { workItemMilestone: { type: Object, required: false, - default: () => {}, + default: () => ({}), }, workItemType: { type: String, @@ -155,9 +155,6 @@ export default { }, }, methods: { - handleMilestoneClick(milestone) { - this.localMilestone = milestone; - }, onDropdownShown() { this.shouldFetch = true; }, @@ -168,9 +165,6 @@ export default { setSearchKey(value) { this.searchTerm = value; }, - isMilestoneChecked(milestone) { - return this.localMilestone?.id === milestone?.id; - }, updateMilestone() { this.localMilestone = this.milestones.find(({ id }) => id === this.localMilestoneId) ?? noMilestoneItem; @@ -234,7 +228,6 @@ export default { v-model="localMilestoneId" :items="dropdownGroups" category="tertiary" - data-testid="work-item-milestone-dropdown" class="gl-max-w-full" :toggle-text="dropdownText" :loading="updateInProgress" diff --git a/app/services/projects/destroy_service.rb b/app/services/projects/destroy_service.rb index 8c86646ba5c..7ba5b6119b9 100644 --- a/app/services/projects/destroy_service.rb +++ b/app/services/projects/destroy_service.rb @@ -34,7 +34,7 @@ module Projects ::Ci::AbortPipelinesService.new.execute(project.all_pipelines, :project_deleted) - Projects::UnlinkForkService.new(project, current_user).execute + Projects::UnlinkForkService.new(project, current_user).execute(refresh_statistics: false) attempt_destroy(project) diff --git a/app/services/projects/unlink_fork_service.rb b/app/services/projects/unlink_fork_service.rb index 898421364db..cdd1870858e 100644 --- a/app/services/projects/unlink_fork_service.rb +++ b/app/services/projects/unlink_fork_service.rb @@ -3,7 +3,7 @@ module Projects class UnlinkForkService < BaseService # Close existing MRs coming from the project and remove it from the fork network - def execute + def execute(refresh_statistics: true) fork_network = @project.fork_network forked_from = @project.forked_from_project @@ -46,6 +46,10 @@ module Projects end # rubocop: enable Cop/InBatches + if Feature.enabled?(:refresh_statistics_on_unlink_fork, @project.namespace) && refresh_statistics + ProjectCacheWorker.perform_async(project.id, [], [:repository_size]) + end + # When the project getting out of the network is a node with parent # and children, both the parent and the node needs a cache refresh. [forked_from, @project].compact.each do |project| |