[MSHOP-180] Suppliers dialog does not have a mandatory field Created: 14/May/15  Updated: 03/Jul/19  Resolved: 03/Jul/19

Status: Closed
Project: Magnolia Shop (closed)
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.2.1

Type: Bug Priority: Neutral
Reporter: Teresa Miyar Assignee: Viet Nguyen
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.5d
Original Estimate: 0.5d

Attachments: PNG File Screen Shot 2015-05-14 at 14.34.24.png     PNG File Screen Shot 2015-05-14 at 14.35.46.png     PNG File supplier_address.png     PNG File supplier_info when create a product.png    
Issue Links:
Cloners
clones MSHOP-163 company name in supliers should be re... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

If you do not enter the company name, you don't get anything in the suppliers selector in the product dialog. The company name is in the second tab of the suppliers dialog easy to miss.



 Comments   
Comment by Viet Nguyen [ 26/May/15 ]
  • Actually the 'Shop' module is using 'company' and 'city' field to display here and it also display nothing in the field when user does not input any 'text' when creating a new supplier like this:

info.magnolia.module.shop.app.field.factory.ProductSupplierSelectFieldFactory - line 86:
fieldDefinition.setLabel(PropertyUtil.getString(supplier, "company", "") + " " + PropertyUtil.getString(supplier, "city", ""));

  • Fix suggestion: using supplier name in parallel with company and city because if I was an editor, I would also expect my supplier name is displayed here in stead of only its company and city. Change to below is my recommendation:

fieldDefinition.setLabel(supplier.getName() + '(' + PropertyUtil.getString(supplier, "company", "N/A") + "@" + PropertyUtil.getString(supplier, "city", "N/A") + ')');

  • See attached images for instance.
Comment by Viet Nguyen [ 26/May/15 ]

Also set this to true to force input company name: /modules/shop/dialogs/createSupplier/form/tabs/address/fields/company@required="true"

Comment by Jan Haderka [ 16/Jun/15 ]
  • Since this is a regression, there needs to be unit test. Most likely Selenium based one.
  • The default label when fields are not filled ("N/A" in your fix) should either be empty, or if not it needs to be externalized and i18n-ized so it can be translated for different languages.
Generated at Mon Feb 12 07:10:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.