[PR #4459] [CLOSED] Fix export order of requests in collections (issue 4375) #4815

Closed
opened 2026-03-17 02:18:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4459
Author: @sz-2302
Created: 10/21/2024
Status: Closed

Base: mainHead: fix/export-order


📝 Commits (4)

  • da519ac Add request sorting by index to myCollections export
  • ecefd50 Add request sorting by index to teamCollections export
  • 629a514 Handle drag-and-drop request reordering and assign new indices
  • 6d83a69 Add request sorting by index

📊 Changes

5 files changed (+94 additions, -14 deletions)

View changed files

📝 packages/hoppscotch-common/src/components/collections/Collection.vue (+6 -0)
📝 packages/hoppscotch-common/src/helpers/backend/mutations/TeamCollection.ts (+42 -7)
📝 packages/hoppscotch-common/src/helpers/import-export/export/myCollections.ts (+6 -2)
📝 packages/hoppscotch-common/src/helpers/import-export/export/teamCollections.ts (+11 -3)
📝 packages/hoppscotch-common/src/helpers/import-export/import/myCollections.ts (+29 -2)

📄 Description

This pull request addresses an issue where the export of collections does not preserve the order of REST requests, making collaboration difficult and affecting request execution order.

What's changed:

  • Updated the myCollectionsExporter and teamCollectionsExporter functions to ensure requests are sorted by their original index before export.
  • Adjusted Collection.vue to update the request index on drag-and-drop reordering, ensuring the correct order is maintained during export.

Notes to reviewers:

This PR ensures that requests are consistently ordered in both personal and team collections, solving the issue of shuffled requests upon export.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4459 **Author:** [@sz-2302](https://github.com/sz-2302) **Created:** 10/21/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/export-order` --- ### 📝 Commits (4) - [`da519ac`](https://github.com/hoppscotch/hoppscotch/commit/da519acd0f7993bebb86df80c40021c984e6cdcb) Add request sorting by index to myCollections export - [`ecefd50`](https://github.com/hoppscotch/hoppscotch/commit/ecefd5092aa39a1a7838c09f9246e5e2bc4887b9) Add request sorting by index to teamCollections export - [`629a514`](https://github.com/hoppscotch/hoppscotch/commit/629a5140978ec44f1e309e1db810bcccad6b807d) Handle drag-and-drop request reordering and assign new indices - [`6d83a69`](https://github.com/hoppscotch/hoppscotch/commit/6d83a698bce6c6a9cf975a56b9dcadf68907aa12) Add request sorting by index ### 📊 Changes **5 files changed** (+94 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components/collections/Collection.vue` (+6 -0) 📝 `packages/hoppscotch-common/src/helpers/backend/mutations/TeamCollection.ts` (+42 -7) 📝 `packages/hoppscotch-common/src/helpers/import-export/export/myCollections.ts` (+6 -2) 📝 `packages/hoppscotch-common/src/helpers/import-export/export/teamCollections.ts` (+11 -3) 📝 `packages/hoppscotch-common/src/helpers/import-export/import/myCollections.ts` (+29 -2) </details> ### 📄 Description This pull request addresses an issue where the export of collections does not preserve the order of REST requests, making collaboration difficult and affecting request execution order. ### What's changed: - Updated the `myCollectionsExporter` and `teamCollectionsExporter` functions to ensure requests are sorted by their original index before export. - Adjusted `Collection.vue` to update the request `index` on drag-and-drop reordering, ensuring the correct order is maintained during export. ### Notes to reviewers: This PR ensures that requests are consistently ordered in both personal and team collections, solving the issue of shuffled requests upon export. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:18:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4815
No description provided.