Recovering case documents: "files keep disappearing from deals"
Lawyers complained that documents were disappearing from cases. The cause turned out to be the robots of three smart processes: each named the case folder on the Shared Drive its own way and created a new one whenever the case was renamed — the old folder with the documents was left with no link from the card.
Nothing could be deleted: these are working documents in court cases. Some links went through an external URL shortener or pointed to the old portal, some cases had their own folder containers, and ambiguous matches could only be resolved together with the lawyers.
- Read-only discovery: the folder pool, classification of every link from the cards (working, via shortener, old portal, empty, junk), orphan folders
- Merging duplicate folders with priority to the root case: contents move into the canonical folder, sources are not deleted, suspicious groups go to manual review
- Syncing files from the card's file fields into the case folder without duplicates by name and size, repairing links and backfilling the service field with the folder id
- Recreating missing folders for cases that had no working folder on the drive at all
- A final one-command pipeline: three dry runs by default, a live run only with confirmation, stop on the first error; a nightly sync via cron
Discovery found 334 folders, 16 duplicate groups and 298 fixable shortener links. The live run processed 750 items: 2,544 files copied, 302 links repaired, 250 folder ids filled — 0 errors; a repeat check confirmed 7,182 files in place across 780 items.
Related services and solutions
Bitrix24 D7: boxed development and stabilization
I work not only with interface settings, but at the level of the box, the code and internal APIs.
Business process automation
When employees transfer data manually, reconcile spreadsheets, lose requests or repeat the same actions — I turn the routine into code.