Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Buggy POST /v2/inventory/stocktaking/productline/list

オープン
#95 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞

調査の方向性

まず、示されているペイロードで POST /v2/inventory/stocktaking/productline/list を再現し、その後 POST /v2/inventory/stocktaking/productline と比較します。両方のエンドポイントにおける count と location.id の処理を、後続の :changeLocation 操作も含めて追跡します。リストエンドポイントが両方のフィールドを永続化し、単一行エンドポイントが位置を更新するのに十分な情報を返すことが完了の条件です。

索引モデルが issue の本文から書いたものです。

説明

While implementing stock-taking using the API we encountered a bug in the API.

Field count and location.id has no effect when issuing POST /v2/inventory/stocktaking/productline/list

POST /v2/inventory/stocktaking/productline/list
[
    {
        "stocktaking": {
            "id": 1040
        },
        "product": {
            "id": 21494313
        },
        "location": {
            "id": 13
        },
        "count": 5
    }
]

response payload:

{
    "fullResultSize": 0,
    "from": 0,
    "count": 1,
    "versionDigest": null,
    "values": [
        {
            "id": 1412118,
            "version": 0,
            "url": "api.tripletex.io/v2/inventory/stocktaking/productline/1412118",
            "stocktaking": {
                "id": 1040,
                "url": "api.tripletex.io/v2/inventory/stocktaking/1040"
            },
            "product": {
                "id": 21494313,
                "url": "api.tripletex.io/v2/product/21494313"
            },
            "count": 0,
            "unitCostCurrency": 0,
            "costCurrency": 0.00,
            "comment": "",
            "counted": false,
            "counter": null,
            "dateCounted": null,
            "expectedStock": 0,
            "location": null
        }
    ]
}

as count is 0 and location is null in the response.

One could work around this in a less performant way by issuing a single POST for each line to add:

POST /v2/inventory/stocktaking/productline
{
    "stocktaking": {
        "id": 1040
    },
    "product": {
        "id": 21494313
    },
    "location": {
        "id": 13
    },
    "count": 5
}

response payload:

{
    "value": {
        "url": "api.tripletex.io/v2/inventory/stocktaking/productline/0"
    }
}

in this request, the field count is working, but location.id does not. Since response payload nor headers do not contain the ID of the line added, one could not go further by issuing PUT /v2/inventory/stocktaking/productline/{ID}/:changeLocation?warehouseLocationId=39 to update the location on the line.

主要言語
言語のデータがありません
スター
49
フォーク
47
平均マージ
31分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Tripletex/tripletex-api2 のほかの issue

Tripletex/tripletex-api2 の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。