Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating shipment with claimService does not add tracking links #2042

Closed
macder opened this issue Aug 14, 2022 · 2 comments
Closed

Creating shipment with claimService does not add tracking links #2042

macder opened this issue Aug 14, 2022 · 2 comments

Comments

@macder
Copy link

macder commented Aug 14, 2022

Bug report

Describe the bug

When creating a shipment via claimService.createShipment it does not add tracking links to the fulfillment. The tracking_links property is missing on the fulfillment object.

It does however mark the shipment as shipped, just no tracking links

System information

Medusa version (including plugins): 1.3.5
Node.js version: 17.1.0
Database: postgres:10.4
Operating system: Ubuntu 18.04
Browser (if relevant):

Steps to reproduce the behavior

  1. Create a claim for an order
  2. Create a fulfillment for the claim order
  3. Create a shipment for the claim fulfillment, eg:
const test = await claimService.createShipment(claim_id, ful_id, [
    {
      tracking_number: "track",
      url: "https://www.usps.com/tracker/123",
    },
  ])

Then observe the fulfillment object, notice there is no tracking_links prop

Expected behavior

Tracking links should be saved to the fulfillment

@srindom
Copy link
Collaborator

srindom commented Aug 15, 2022

@macder - thanks for reporting; I think the tracking links are on the fulfillment but are not showing up in Admin because the tracking links are not joined when querying the order.

Should be a fairly quick fix by just adding "claims.fulfillments.tracking_links" here: https://github.com/medusajs/medusa/blob/master/packages/medusa/src/api/routes/admin/orders/index.ts#L260

Will have it included in the next release :)

@macder
Copy link
Author

macder commented Aug 15, 2022

@srindom Glad to hear that it was an easy quick fix.

Thanks for the quick turnaround :)

carlos-r-l-rodrigues pushed a commit that referenced this issue Aug 22, 2022
…1992)

feat(medusa): Convert CollectionService to TypeScript (#1976)

feat(medusa): Convert OauthService to TypeScript (#1983)

feat(medusa-js): Add Collection batch (remove, add) endpoints (#1958)

feat(medusa-react): Add Collection batch (remove, add) endpoints (#1959)

feat(medusa-payment-stripe): Add support for Przelewy24 and Blik (#1982)

feat(medusa): Convert ShippingProfileService to TypeScript (#1963)

feat(medusa): Use transactions in CartCompletionStrategy (#1968)

feat(medusa): Convert IdempotencyKeyService to TypeScript (#1995)

* feat(medusa): Migrate the idempotency key service to ts + fix

* feat(medusa): Finalise idempotency migration

* Create late-owls-pump.md

* feat(medusa): Polish

* feat(medusa): Add case to the error handler

* feat(medusa): Add case to the error handler

Co-authored-by: olivermrbl <oliver@mrbltech.com>

feat(medusa,medusa-telemetry): Add telemetry on feature flags (#2017)

chore(medusa): Feature flag loader simplify, deduplicate and increase readability (#2025)

feat(medusa:) Convert PaymentProvider + PaymentProviderInterface to TS +  (#1773)

* feat(payments): Refactor core Payment related

* fix(medusa): typings

* test(unit): fix suite

* test(unit): fix suite

* feat(medusa): Improve payment provider container typings

* fix(medusa): typings

* styles(medusa): renove comments

* feat(medusa): cleanup

* feat(medusa): Add uniq constraint on payment session and idem key on create-payment-session end point

* fix(medusa): migration

* fix(medusa): create payment session

* feat(medusa): cleanup

feat(medusa): Refactor undefined check into a single util (#2024)

chore(medusa): Remove intepestive services re instanciation in loop (#2036)

* chore(medusa): Renove intepestive services re instanciation in loop

* test(medusa): Fix missing deps

* fix(medusa): Missing await

feat(medusa): Simplify the transaction base service (#2007)

**What**
Simplify the transaction base service.

**How**

In fact, it does not need to be template and reduce the extensibility as the type is internally enforce. Now, the type is deduced by this which can be any derived class.

fix(medusa): join tracking links to all fulfillments in admin/orders (#2045)

Fixes #2042

feat(medusa): Implement the SC migration scripts (#2037)

**What**
Migrate the existing products to the default sales channel

FIXES CORE-434

fix(medusa): Complete cart with 100% discount (#2032)

**What**
Naive fix to allow carts with 100% discount to be completed.

**Why**
Discount total is wrongly calculated if `items` and `items.adjustments` is not included in relations upon retrieving the cart.

**Thought**
This is yet another example of why we need to rethink and refactor totals computation to not depend on what is provided by the user.

fix(medusa-payment-stripe): Add item adjustments relation in CartSubcriber (#2052)

added upgrade guide for v1.3.6

Revert "added upgrade guide for v1.3.6"

This reverts commit 9c3c8cb.

feat(medusa): Migrate Return service to ts (#1926)

feat(medusa): Add Mongolian currency tugrug (#2067)

tests(integration-tests): Allow null updates in discounts (#1299)

feat(medusa): Filtering Customer Orders (#975)

feat(medusa-js): Add deleteSession endpoint (#1234)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants