? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
25 May 2021

Pull Request for Issue # .

Summary of Changes

This PR improves the code of contact view of com_contact component (mostly relate to handle breadcrumb). The code which we are having right now is a mess, hard to understand and difficult to maintain:

  • We are using string comparison to check if the current active menu item is linked to com_contact
  • Duplicate to calculate params for the contact item
  • Bad code to handle breadcrumb

The new code is base on the current code which we are having in view article in com_content. It is much easier to understand compare to the original code.

Testing Instructions

  1. Create two contact categories. Add 2 or 3 contacts to each category (You can use Save As Copy button to save time for creating multiple contacts)
  2. Create menu items to the following menu item types of Contacts component:
  • List All Categories in a Contact Category Tree
  • List Contacts in a Category
  • Single Contact
  1. Apply patch
  2. Access to above menu items, then try to access to contact, make sure breadcrumb is handled properly
  • For contact accessed base on the first two menu item types, the breadcrumb displayed in the breadcrumb has this format:
    Home / Active Menu Item / [Sub Category] / Contact Name

  • For contact accessed from Single Contact menu item type, the breadcrumb should have this format:
    Home / Active Menu Item

Actual result BEFORE applying this Pull Request

Works but code looks bad.

Expected result AFTER applying this Pull Request

Works and code is cleaner, easier to understand.

avatar joomdonation joomdonation - open - 25 May 2021
avatar joomdonation joomdonation - change - 25 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 May 2021
Category Front End com_contact
avatar sandramay0905
sandramay0905 - comment - 25 May 2021

Works like without patch.

If a contact-category have no menu-item like one of the two categories, the breadcrumb show for a single contact Home / Contact.

What i mean:

  1. The contact-category "Business" has no menu-item.
  2. In the menu-item Contact-Tree breadcrumbs show after click on category "Business" Home / Contact Tree / Business
  3. Click on contact "Employee" of this category breadcrumb show Home / Contact.

@joomdonation If this is expected, i can submit a successfully test result.

avatar joomdonation joomdonation - change - 25 May 2021
Labels Added: ?
avatar joomdonation
joomdonation - comment - 25 May 2021

@sandramay0905 Yes. This PR just improves code. So Yes, it works exactly the same as without patch.

avatar sandramay0905 sandramay0905 - test_item - 25 May 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 25 May 2021

I have tested this item successfully on d3e29b0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34201.

e2128d0 25 May 2021 avatar Quy since
avatar sandramay0905
sandramay0905 - comment - 27 May 2021

I guess this needs no retest cause only @since changed.

avatar joomdonation
joomdonation - comment - 27 May 2021

@sandramay0905 Thanks. Yes. You don't need to re-test. We can restore your previous test result because last change is just a small code style change only.

avatar chmst chmst - test_item - 31 May 2021 - Tested successfully
avatar chmst
chmst - comment - 31 May 2021

I have tested this item successfully on e2128d0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34201.

avatar alikon alikon - alter_testresult - 31 May 2021 - sandramay0905: Tested successfully
avatar alikon alikon - change - 31 May 2021
Status Pending Ready to Commit
avatar alikon
alikon - comment - 31 May 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34201.

avatar wilsonge wilsonge - change - 31 May 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-05-31 19:54:03
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 31 May 2021
avatar wilsonge wilsonge - merge - 31 May 2021
avatar wilsonge
wilsonge - comment - 31 May 2021

Thanks!

Add a Comment

Login with GitHub to post a comment