Skip to content

$installdefs parameter schedulers in manifest.php is not respected as documented while installing a module #10403

Open
@isleshocky77

Description

@isleshocky77

Issue

The documentation Module Installer states that there is a key for schedulers which would be

An array of schedulers to be installed. Each entry is an array with a single key:

This means that these should be copied to the schedulers directory.

However, in practice, this functionality does not work.

If you look at the $manifestMap in ModuleInstall/ModuleScanner.php:51 as well $tasks ModuleInstall/ModuleInstaller.php:123 you'll see there isn't actually a definition for schedulers or a install_schedulers task.

The work around for this is you need to use the copy key like such

    'copy' => [
        [
            'from' => '<basepath>/schedulers/CustomModule.php',
            'to' => 'custom/Extension/modules/Schedulers/Ext/ScheduledTasks/CustomModule.php',
        ],
    ],

Expected Behavior

When installing a custom module with a manifest.php file that has a key for schedulers, it should install the Scheduler. as documented.

Actual Behavior

The key schedulers key in manifest is just ignored.

Possible Fix

Add the correct functionality to ModuleInstall/ModuleScanner.php:51 and ModuleInstall/ModuleInstaller.php:123

Steps to Reproduce

  1. Create a Custom module
  2. Update the manifest.php to have an array with a key of schedulers
  3. Create in the module a Scheduler
  4. Install the custom module through Module Loader
  5. Look at scheduled jobs

Context

The documentation is wrong and takes a bit of debugging to figure out. You then need to use the copy key instead of a cleaner schedulers key for what is actually going on.

Your Environment

  • SuiteCRM Version used: 7.x
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): 123.0.6312.86

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: ModuleIssues & PRs related to modules that do not have specific labelPriority:ImportantIssues & PRs that are important; broken functions, errors - there are workaroundsSeverity: ModerateKey function failed, but no or little impactType: BugBugs within the core SuiteCRM codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions