Skip to content

Conversation

@olewandowski1
Copy link
Collaborator

@olewandowski1 olewandowski1 commented Nov 3, 2025

Link to GitHub issue or Jira ticket: https://openboxes.atlassian.net/browse/OBLS-284

Description:

  • Allow to update barcode via mobile app
  • Send an email about the change
  • Provide info about UPC to the fe
  • Ensure upc is unique

@github-actions github-actions bot added domain: frontend Changes or discussions relating to the frontend UI domain: backend Changes or discussions relating to the backend server domain: l10n Changes or discussions relating to localization & Internationalization labels Nov 3, 2025
@olewandowski1 olewandowski1 changed the title Obls 284 OBLS-284 allow to update barcode, send notification about update Nov 3, 2025
@olewandowski1 olewandowski1 marked this pull request as ready for review November 5, 2025 11:10
action = [GET: "details"]
}

"/api/mobile/products/$id/barcode" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There was a change request related to this endpoint in mobile repo

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

return
}

if (oldUpc?.trim() == newUpc) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this check needed? Do we care if there was an actual change or not?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd say so - it prevents spamming the user with unnecessary emails and saves resources.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@olewandowski1 The reason I asked was because I was not sure about i don't like status: 'no_change' approach (since this is not our convention in such cases, and is not idiomatic REST), and because I was not fully sure how we'd like to have it done instead (if it should be a 204 in this case or a 200 with additional info), I thought it is just not required now, and we can get rid of it for now and revisit later if needed. On the other hand, if you just don't want to send the notification, you could check this on the notification send level.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Kk, makes sense to me now, I'll correct it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: backend Changes or discussions relating to the backend server domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants