[PR #5365] [MERGED] fix: orderIndex update to scope by collection ID #5176

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5365
Author: @mirarifhasan
Created: 9/1/2025
Status: Merged
Merged: 9/2/2025
Merged by: @jamesgeorge007

Base: patchHead: hotfix/delete-team-req


📝 Commits (1)

  • 38923b4 fix: orderIndex update to scope by collectionID

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 packages/hoppscotch-backend/src/team-request/team-request.service.ts (+4 -1)

📄 Description

What's changed

This pull request makes a targeted change to the logic for updating the orderIndex of team requests in the TeamRequestService. The update ensures that only requests within the same collection are affected when decrementing orderIndex values.

Closes #5364.

  • Restricts the scope of the updateMany operation in TeamRequestService to only affect requests with the same collectionID as the current team request, preventing unintended changes across collections.

Reproduce the issue

In the team workspace, create two collections. Create three requests in each collection.
Now try to delete 2nd (middle) team request from any one collection.

Notes to reviewers

Simulate [Reproduce the issue] section and see if the issue resolved.


🔄 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/5365 **Author:** [@mirarifhasan](https://github.com/mirarifhasan) **Created:** 9/1/2025 **Status:** ✅ Merged **Merged:** 9/2/2025 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `patch` ← **Head:** `hotfix/delete-team-req` --- ### 📝 Commits (1) - [`38923b4`](https://github.com/hoppscotch/hoppscotch/commit/38923b42e78627e6a69edfb7e432455bf2051e80) fix: orderIndex update to scope by collectionID ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/src/team-request/team-request.service.ts` (+4 -1) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> <!-- Issue # here --> <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> This pull request makes a targeted change to the logic for updating the `orderIndex` of team requests in the `TeamRequestService`. The update ensures that only requests within the same collection are affected when decrementing `orderIndex` values. Closes #5364. * Restricts the scope of the `updateMany` operation in `TeamRequestService` to only affect requests with the same `collectionID` as the current team request, preventing unintended changes across collections. ### Reproduce the issue In the team workspace, create two collections. Create three requests in each collection. Now try to delete 2nd (middle) team request from any one collection. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> Simulate [Reproduce the issue] section and see if the issue resolved. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:39:01 +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#5176
No description provided.