-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Store Tracking URL in DB as well as Tracking Code #10799
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
Store Tracking URL in DB as well as Tracking Code #10799
Conversation
|
* @param string $trackUrl | ||
* @return $this | ||
*/ | ||
public function setTrackUrl($trackUrl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New methods cannot be added into existing @api
interfaces as it will break every existing interface implementation. Please check http://devdocs.magento.com/guides/v2.0/contributor-guide/backward-compatible-development/#introduction-of-a-method-to-a-class-or-interface
@@ -55,6 +55,15 @@ public function testSetGetNumber() | |||
$this->assertEquals('test', $this->_model->getTrackNumber()); | |||
} | |||
|
|||
public function testSetGetUrl() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test method is useless.
@@ -41,14 +41,17 @@ public function testGetList() | |||
$filter3 = $filterBuilder->setField(ShipmentTrackInterface::TRACK_NUMBER) | |||
->setValue('track number 4') | |||
->create(); | |||
$filter4 = $filterBuilder->setField(ShipmentTrackInterface::CARRIER_CODE) | |||
->setValue('carrier code 5') | |||
$filter4 = $filterBuilder->setField(ShipmentTrackInterface::TRACK_URL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added new search criteria but didn't change the test's fixture. Seems these changes cause travis failures. Does this test work as expected in your environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I've updated the tests again, including the fixtures, please check again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed.
/** | ||
* Shipment Track Creation interface. | ||
*/ | ||
interface TrackUrlInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introduction of the new interface should bump the minor version of a package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've bumped the version number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not see any changes in composer.json file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I supposed to update this composer.json?
Can you confirm what you mean exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to bump the version of composer.json in Sales module and specify the updated version in the replace
section of "root" composer.json file. Also TrackUrlInterface
should be marked as API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to bump the version of
composer.json
in Sales module and specify the updated version in the replace section of "root"composer.json
file
Would be nice if such info added to http://devdocs.magento.com/guides/v2.0/contributor-guide/backward-compatible-development/ or http://devdocs.magento.com/guides/v2.2/extension-dev-guide/versioning/
composer.json
Outdated
@@ -86,122 +86,121 @@ | |||
"sebastian/phpcpd": "2.0.4" | |||
}, | |||
"replace": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @orlangur
Can you help me by providing me with a correct version of composer.json ?
I'm not sure what version each of the modules are supposed to be in the replace
section. All I do know is that "magento/module-sales": "100.3.0-dev",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And can you confirm my target branch? My PR is currently targeting develop
branch, whereas maybe it should be 2.2.0-preview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should definitely be develop
, please change back.
develop
branch reflects what will be later released as 2.3
, most of the modules are 100.3.0-dev
so I assume your change makes module Sales
100.4.0-dev
(@joni-jones, please check).
[mpi] MAGETWO-72551: Update version in composer to 2.2.1-dev for 2.2-develop branch
… include in Sales Shipment Email
|
Hi @orlangur Please refer to message from @joni-jones
|
It is misleading, see https://community.magento.com/t5/Magento-DevBlog/Pull-Requests-for-2-1-x-Patch-Releases/ba-p/65630 for details. The same rules apply for @joni-jones please confirm. |
I used
I'll go ahead and make my changes on top of that branch
Please bear in mind this is a feature requirement for the upcoming Magento Shipping module (currently scheduled for v2.2.2). |
Where do you get such information by the way? I didn't contact Nadia but by myself didn't hear it yet.
You need to apply your commits on top of |
0c0393d
to
e442de5
Compare
Please see comments here #10977 |
@RhodriOwainDavies discussed with @antonkril today, this change cannot be released in 2.2 as backward incompatible. Please re-create the PR for develop branch |
Please beware this is critical for Magento Shipping (to be released in v2.2.2 - discuss with @joni-jones @orlangur & Nadia Kalinovich
Linked to #10977
Forked from
2.2-develop
branch, merge target branch2.2-develop
as per @joni-jones 's request.Description
Add a new field sales_shipment_track.track_url.
Expose this field via API.
Including this URL as a hyperlink in the Shipment Sent Email template.
Feature
To support impending Magento Shipping feature request of inserting Carrier Specific URL in email template to Customer
Manual testing scenarios
POST /V1/order/{orderId}/ship
Pass in tracking_url as an extension attribute (in same manner as tracking_number)
In the admin section, view a Shipment which already has a trackinging URL set (via API in Test Can you commit to repository a folder dev/tests/static ? #1). Click Send Tracking Email. Check email, Tracking Number should be a hyperlink to tracking_url
Contribution checklist