/shop delete destroys the store's stock instead of returning it
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Start with DeleteCommand, where the issue says the inventory check and unfinished TODO already exist, then inspect the delete command tests and the wiki's Commands page. Trace how finite stock and negative quantities are handled, and run the relevant tests. Done when a plain delete returns finite stock or leaves the store unchanged if inventory is insufficient, force flags still discard stock, and the wiki matches.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
DeleteCommand checks that the player has room for the store's items, then deletes the store without giving them the items. All remaining stock is lost, even on a plain /shop delete <store> with no flags.
The inventory check implies the items should be returned, and so does STORE_DELETE_INSUFFICIENT_INV_PLAYER, which tells players to clear space or use -f to ignore inventory. A TODO in DeleteCommand also notes that removing all items is unfinished. The balance is refunded correctly unless -F is used.
The existing -f and -F tests only cover the forced paths, where an empty inventory is expected.
Steps to reproduce
- Create a store and add items to it.
- Run
/shop delete <store>with enough free inventory space. - The store is deleted, but the items aren't in the player's inventory.
Scope
- Give the store's stock to the player when deleting without a force flag.
- Keep
-fand-Fdiscarding stock, and make sure the behavior is clear in the command's messages. - Handle items with infinite stock (negative quantity) so they don't create items or fail the inventory check.
Done when
- A plain delete moves all finite stock to the player's inventory.
- A plain delete with too little space is refused and the store is unchanged.
- Tests cover the plain delete with stock, and
-fand-Fstill discard it. - The wiki's Commands page, which currently warns that stock isn't returned, matches the fix.
- Fixed before the 0.4.0 full release.
- Ngôn ngữ chính
- Java
- Star
- 1
- Fork
- 0
- Merge trung bình
- 2 giờ 35 phút
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của BrendonButler/Shops
-
dependencies enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
BrendonButler/Shops#79 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
BrendonButler/Shops#70 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
BrendonButler/Shops#69 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
BrendonButler/Shops#68 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
BrendonButler/Shops#67 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của BrendonButler/Shops
Issue tương tự
-
jules
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
open-learning-exchange/myplanet#18568 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
hibernate/hibernate-reactive#4485 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type: dependency-upgrade
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
spring-projects/spring-graphql#1556 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
higress-group/higress-console#800 ·
Maintainer thường phản hồi trong vòng 1 ngày