Follow-up from "Clear open issues count cache after bulk updating issues state"

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Related to #299178 (closed)

As the next iteration to !56386 (merged) we can reuse the new worker to clear cached count when importing issues with Issues::ImportCsvService.

Also, this functionality can be extended for merge requests given that we are caching their count now and their state can be bulk updated.

Other cases to consider:

Another place where a bulk update of issue states can happen is in Boards::IssuesController#bulk_move. This is when you select multiple issue cards and drag them to Closed or Open. This is a rarely used feature though I think it has no limit to the number of issues you can select. I don't expect users to select very many issues though because they'd need to ctrl+click each one. I also mentioned in !56386 (comment 546866959) that our bulk update in the issue list is actually limited by our pagination (20). So maybe we don't really need to handle that case?

Another case where the issue counts could change a lot is when a project / group is moved. I wonder if we should handle this too?

Edited by 🤖 GitLab Bot 🤖