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

9232 listview display url content type #9234

Open
wants to merge 3 commits into
base: hotfix
Choose a base branch
from

Conversation

gody01
Copy link
Contributor

@gody01 gody01 commented Jul 15, 2021

Changes to display content of generated field of type 'url' in ListView.

Description

Fix for issue #9232 - Content of custom fields of type URL (Generate link) is not displayed in listviews

  1. In include/ListView/ListViewDisplay.php
    In function setupFilterFields
  • added check if 'default' value for 'url' type fields contains dependend fields
  • add dependend fields to $filter_fields, so they are retrieved from DB
  1. In data/SugarBean.php
    In function get_list_view_array
  • added check if value of 'default' for 'url' type fields contains dependend fields (that means, that 'url' field is generated)
  • return value of 'default' as field value

Motivation and Context

To display 'url' generated fields in listviews.

How To Test This

  • define URL type field with checked generated box
  • select filed to generate
  • define field to be displayed in ListView
  • Check correct or any URL is displayed in ListView

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • [X ] My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • [ X] I have read the How to Contribute guidelines.

…ields of type URL (Generate link) is not displayed in listviews salesagility#9232

include dependend fields for url field in $filter_fields.

public function setupFilterFields

 Changes to be committed:
	modified:   ListViewDisplay.php
…ields of type URL (Generate link) is not displayed in listviews salesagility#9232

For generated 'url' field type, export valaue of default as value to display.

On branch 9232_listview_display_url_content_type
Cherry-pick currently in progress.

Changes to be committed:
	modified:   SugarBean.php
 Your branch is up to date with 'origin/9232_listview_display_url_content_type'.

 Fixed also custom selectable listView (use Url's own template as originalai intended, not Link's template)

 Changes to be committed:
	modified:   data/SugarBean.php
	renamed:    include/SugarFields/Fields/URL/DetailView.tpl -> include/SugarFields/Fields/Url/DetailView.tpl
	renamed:    include/SugarFields/Fields/URL/EditView.tpl -> include/SugarFields/Fields/Url/EditView.tpl
	renamed:    include/SugarFields/Fields/URL/ListView.tpl -> include/SugarFields/Fields/Url/ListView.tpl
	modified:   include/SugarFields/SugarFieldHandler.php
Copy link
Contributor

@samus-aran samus-aran left a comment

Choose a reason for hiding this comment

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

I'm abit weary renaming tpl files in case others use it directly. Is it necessary? I know it would be inline with other fields name formats but is the effort doing it worth a potential breakage just for a lettercase. :)

@@ -80,9 +80,11 @@ public static function fixupFieldType($field)
case 'date':
$field = 'datetime';
break;
/* #9232 user's selected column not displayed properly with link template
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @gody01 Just asking why is this commented out? Is there still more work to be done to be done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants