View Issue Details

IDProjectCategoryView StatusLast Update
0006814Talermechant backendpublic2024-01-12 14:04
Reportersebasjm Assigned Tosebasjm  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006814: looking up for order using date parameter and positive delta returns empty
Descriptionhttps://git.taler.net/merchant.git/tree/src/backend/taler-merchant-httpd_private-get-orders.c#n525
I think it need to be move after delta is parsed and set to -1 if delta is positive.

Example, this are the orders in the db

row: 23
timestamp: 1616507460000
date: 2021-03-23+13:51:00

row: 22
timestamp: 1616504459000
date: 2021-03-23+13:00:59

row:21
timestamp: 1616507464000
date: 2021-03-23+13:00:58


$ curl 'http://localhost:9966/instances/default/private/orders?delta=-1&start=22'

returns row 21

$ curl 'http://localhost:9966/instances/default/private/orders?delta=1&start=22'

returns row 23

$ curl 'http://localhost:9966/instances/default/private/orders?delta=-1&date=2021-03-23+13:00:59'

returns row 21

$ curl 'http://localhost:9966/instances/default/private/orders?delta=1&date=2021-03-23+13:00:59'

empty, expected rows 23

Additional Information$ curl 'http://localhost:9966/instances/default/private/orders?delta=-3&date=2021-03-23+13:51:04' | jq .
{
  "orders": [
    {
      "order_id": "2021.082-0009M5F0ZZ60M",
      "row_id": 23,
      "timestamp": {
        "t_ms": 1616507460000
      },
      "amount": "COL:13",
      "summary": "some summary with a random number 14",
      "refundable": false,
      "paid": false
    },
    {
      "order_id": "2021.082-01E7CE0E5RXHR",
      "row_id": 22,
      "timestamp": {
        "t_ms": 1616504459000
      },
      "amount": "COL:18",
      "summary": "some summary with a random number 16",
      "refundable": false,
      "paid": false
    },
    {
      "order_id": "2021.082-0087068X0YW8R",
      "row_id": 21,
      "timestamp": {
        "t_ms": 1616504458000
      },
      "amount": "COL:2",
      "summary": "some summary with a random number 4",
      "refundable": false,
      "paid": false
    }
  ]
}
TagsNo tags attached.

Activities

sebasjm

2021-03-24 15:55

developer   ~0017641

fixed in e2b2e608..8d25278c

Issue History

Date Modified Username Field Change
2021-03-23 21:18 sebasjm New Issue
2021-03-23 21:18 sebasjm Status new => assigned
2021-03-23 21:18 sebasjm Assigned To => Christian Grothoff
2021-03-24 15:55 sebasjm Status assigned => resolved
2021-03-24 15:55 sebasjm Resolution open => fixed
2021-03-24 15:55 sebasjm Fixed in Version => git (master)
2021-03-24 15:55 sebasjm Note Added: 0017641
2021-03-27 00:46 Christian Grothoff Assigned To Christian Grothoff => sebasjm
2021-03-27 00:46 Christian Grothoff Fixed in Version git (master) => 0.9
2021-03-27 00:46 Christian Grothoff Target Version git (master) => 0.9
2021-07-30 13:57 Christian Grothoff Fixed in Version 0.9 => 0.8.1
2021-07-30 13:59 Christian Grothoff Target Version 0.9 => 0.8.1
2021-07-30 14:02 Christian Grothoff Fixed in Version 0.8.1 => 0.8
2021-07-30 14:02 Christian Grothoff Target Version 0.8.1 => 0.8
2021-08-24 16:23 Christian Grothoff Status resolved => closed
2024-01-12 14:04 Christian Grothoff Category merchant backend API (C) => mechant backend