coopcycle-web
coopcycle-web copied to clipboard
Improve UX for exports: one single export with all relevant information
- [ ] @Titooo94 Provide an example spreadsheet of what is expected
Right now, there are 2 places in which you can export information from the platform:
Export of tasks from the dashboard
- Task number
- Type
- Address Name
- Address
- GPS Coordinates
- Address description
- After
- Before
- Status
- Comments
- Eventdone notes
- Eventfailed notes
- Finished at
- Courier
- Tag
- Address contact name
- Organisation
Export of deliveries
- Organisation
- Pick up address
- Pick up after
- Drop Off Address
- Drop off before
- Weight
- Distance
- Order Number
- Order total
- Packages
It looks like it is also missing an alias to identify deliveries.
Having all important information in one single export would be very helpful
Maybe this issus and the "Introducing Import/Export of multipoint deliveries #3046" are connected. If you are able to link two task (dropoff and deliveries with the number linked (#4545 and #4546))- or one dropoff and multiple task with the number linked- of an export and make them belong to a store. Then there no "Task" and "Deliveries", there is task within a deliveries, and then you do just ONE export files.
Generally speaking, it would be smart to move this extract to Cube
. This way, we can benefit from Cube
's caching capabilities, and also it's almost already available via the API.
Here we can see two issues that should be resolved in this improvement
- that order codes that use the letter E are understood in excel as a representation of thousands, which makes data cleaning, ordering, and cleaning impossible
- the date / time format is inoperable
Possible solutions: 1.A: do something about excel formats that I don´t know how to do so that it understands all orders as text 1.A: Disallow the letter E from order codes 2.A: have a date column with standarized format and no time (DD/MM/YYYY) (if it is this way, than its not month "6" its month "06" and another column with hour done the same way (HH:MM:SS or HH:MM) 2.B: something else about excel formats that I don´t know how to do
Hey, so I have reviewed the deployed feature. There are a few issues.
- We have at minimum, every pickup and dropoff duplicated, and sometimes in triplicate
- It appears there are no comments being registered, since I know that riders have been making comments for all the pickup orders
- At the end there are a number of tasks with no "ordernumber" or order ID code (not sure about vocabulary, its the 2nd and 3rd columns) and strangely, in this orders there are two comments.
photos attached. I will move the issue out of "done" in projects given these issues
Lastly, there was some confusion on the subject but I thought it was addressed. It is vital that we have the dynamic price for a store delivery, and the price for the cooperative for food delivery orders as well. Specifically, it should include the following: Stores: Total price charged to the store; names of pricing rules or products that have created this price Restaurants: Total cart amount, total paid, total for coopcycle cooperative (all with IVAs)
otherwise, this cannot be used for economic control as we talked about. That said, maybe we can turn this into 2 issues, 1 about implementing all relevant nonprice information, and another issue about adding all relevant pricing issue, given that the pricing is related to the separate issue about multi-dropoff and multi-pickup orders and dynamic pricing
Sorry, I need to edit point 2
It does have the correct comments in event.DONE.notes, but i couldn't see them because the "comments" column had been made 25 cm wide due to a formatting issue and I thought the excel was empty from there to the right. Once I resized the column, all good. Can we change the way the export is formatted so that this doesn't happen somehow?
Working on reported bugs
Still getting repeating tasks ☹
For an unknown reason, a missing Content-Type
header was causing empty files, only in production
Should be fixed in df74398e21659e288ff717638dcd1bde5b23a2c9
Actually, the problem persists in production. Cube server only returns results on the 2nd HTTP call 🤔
Found the problem. In production, sometimes the Cube server responds with "Continue wait":
< HTTP/1.1 200 OK
<
* Connection #0 to host cubejs.coopcycle.org left intact
{"error":"Continue wait","stage":{"stage":"Executing query","timeElapsed":4985}}
A solution is to implement a retry mechanism inside the CubeJs HTTP client.
Here says that we can adjust a config called continueWaitTimeout in order to change the time Cube waits before returning Continue wait
message.
Also, could be helpful check logs and see how long it took for Postgres to execute the query. Seems like we could significantly speed the query up by adding a pre-aggregation layer in Cube. More info here
@lucasferraro yep, pre-aggregation should definitely be setup. For the moment, I'm just implementing a retry mechanism to hotfix the issue.
Retry strategy implemented in a66fdb31c38cf1f92a66bb2ca37c9bf52c72b58f
Test version currently has a column that has income for the coop IVA incluido if a store task (flowers) and total cart value if a platform shop order
We need a column that shows the cooperatives final income for each delivery. So price of the store task if a store task, OR the commission of a platform order minus stripe fees if a platform shop order
Remember, the point here is to have one column with the real life actually income of the cooperative for calculating income vs costs
🥳