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

Implement product clone #11785

Conversation

chahmedejaz
Copy link
Collaborator

@chahmedejaz chahmedejaz commented Nov 8, 2023

What? Why?

What should we test?

  • Validate all the scenarios mentioned in the issue above
  • Also confirm that cloning in the old Bulk Product Edit screen still works as expected.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, and I have a suggestion to improve.

@chahmedejaz
Copy link
Collaborator Author

Thanks for the suggestions @dacook. Will incorporate those :)


flash[:success] = if @new.save
Spree.t('notice_messages.product_cloned')
Copy link
Collaborator Author

@chahmedejaz chahmedejaz Nov 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this to match with old UI experience i.e. We don't show any message on the UI whether the clone process was successful or not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to remove the unused code 👍
Of course, we will try to implement these messages in the new UI, but the method will depend on #11517 which is in progress.

Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far, will await for Mario's comment


flash[:success] = if @new.save
Spree.t('notice_messages.product_cloned')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to remove the unused code 👍
Of course, we will try to implement these messages in the new UI, but the method will depend on #11517 which is in progress.

@chahmedejaz chahmedejaz marked this pull request as ready for review November 16, 2023 22:43
@chahmedejaz chahmedejaz requested a review from dacook November 16, 2023 22:43
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I checked the specs and they look good too, although I have a suggestion to speed one up so will go ahead and try it.

Additionally, I've noticed that you've merged master into the branch a few times. Most of the time, it's ok when it says "This branch is out of date", but if there is a conflict, we do need to update it sometimes.
So when we do this, our preference is to rebase in order to keep commit history clean. Could you please try that next time?

@dacook

This comment was marked as resolved.

@dacook
Copy link
Member

dacook commented Nov 17, 2023

Awaiting a second review and manual testing.

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thank you!

I will adjust one little thing and rebase at the same time.

@chahmedejaz
Copy link
Collaborator Author

Thank you @dacook for the suggestions. I'll take care of the rebase thing next time. 😄

@RachL RachL added the technical changes only These pull requests do not contain user facing changes and are grouped in release notes label Nov 17, 2023
@mariocarabotta mariocarabotta added pr-staged-au staging.openfoodnetwork.org.au and removed pr-staged-au staging.openfoodnetwork.org.au labels Nov 20, 2023
@mariocarabotta mariocarabotta added the pr-staged-au staging.openfoodnetwork.org.au label Nov 22, 2023
@mariocarabotta mariocarabotta removed the pr-staged-au staging.openfoodnetwork.org.au label Nov 22, 2023
@RachL RachL added the pr-staged-fr staging.coopcircuits.fr label Nov 22, 2023
@RachL RachL self-assigned this Nov 22, 2023
@RachL RachL added pr-staged-fr staging.coopcircuits.fr and removed pr-staged-fr staging.coopcircuits.fr labels Nov 22, 2023
@RachL
Copy link
Contributor

RachL commented Nov 22, 2023

Seems to work as expected, thanks @chahmedejaz 💪

Merging!

@RachL RachL merged commit 1088b6b into openfoodfoundation:master Nov 22, 2023
@RachL RachL removed the pr-staged-fr staging.coopcircuits.fr label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical changes only These pull requests do not contain user facing changes and are grouped in release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUU] Clone a product
5 participants