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

In a file-based custom module, view file information in the subpanel and list view #10576

Open
SinergiaCRM opened this issue Nov 15, 2024 · 0 comments
Labels
Area: Module Issues & PRs related to modules that do not have specific label Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Severity: Moderate Key function failed, but no or little impact Type: Bug Bugs within the core SuiteCRM codebase

Comments

@SinergiaCRM
Copy link
Contributor

Issue

In a custom module based on the file type template, when adding the field that refers to the file (upload) in the list view, the link to the file name that allows its download is not displayed, only the eye icon that allows opening the file directly in the browser is displayed, unlike what happens in the Documents module, where both options appear. The same thing happens in the subpanel view.

As we have seen, there are important differences at the Vardef level between the Documents module and a custom module that inherits from the File template:

Document Vardef:

    'filename' => 
    array (
      'name' => 'filename',
      'vname' => 'LBL_FILENAME',
      'type' => 'file',
      'source' => 'non-db',
      'comment' => 'The filename of the document attachment',
      'required' => true,
      'noChange' => true,
      'allowEapm' => true,
      'fileId' => 'document_revision_id',
      'docType' => 'doc_type',
      'docUrl' => 'doc_url',
      'docId' => 'doc_id',
    ),

Custom File module Vardef:

    'filename' => 
    array (
      'name' => 'filename',
      'vname' => 'LBL_FILENAME',
      'type' => 'varchar',
      'required' => true,
      'importable' => 'required',
      'len' => '255',
      'studio' => 'false',
    ),

    'uploadfile' => 
    array (
      'name' => 'uploadfile',
      'vname' => 'LBL_FILE_UPLOAD',
      'type' => 'file',
      'source' => 'non-db',
    ),

Possible Fix

Update the structure and views of the File template so that when you create a custom module based on that template, it behaves like the Documents module

Steps to Reproduce the Issue

1. Create a File type module and a relationship with Contacts of type N to 1, that is, a contact can be related to N records of this module.
2. Publish the module and upload it to the CRM.
3. Create a record and indicate a file and a person.
4. Access the list view of the custom module and check that the link to the file name that allows its download is not displayed.
5. Access the detail view of the contact, open the subpanel of the custom module and check that by default, there is no information related to the display or download of the file.
6. Check the differences in the filevar and in the views of both modules.

Context

No response

Version

7.14.4

What browser are you currently using?

Firefox

Browser Version

131.0.3 (64-bit)

Environment Information

MySQL, PHP Version 8.2

Operating System and Version

Ubuntu 22.04.4 LTS

@SinergiaCRM SinergiaCRM added the Type: Bug Bugs within the core SuiteCRM codebase label Nov 15, 2024
@johnM2401 johnM2401 added Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Area: Module Issues & PRs related to modules that do not have specific label Severity: Moderate Key function failed, but no or little impact labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Module Issues & PRs related to modules that do not have specific label Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Severity: Moderate Key function failed, but no or little impact Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

2 participants