Conversation
|
I'm very eager to have this PR passed, because I'm currently limited in my use of the plugin by the UI bugs Is there a way to generate a (beta) release so I can already test-drive this in our environment? Edit: found your fork @fud18 and installed the plugin from there |
There was a problem hiding this comment.
In this file every line seems to be touched, but not always changes, making the actual diff impossible to see.
Perhaps a line-ending/formatting thing?
There was a problem hiding this comment.
For some reason Github won't let me resolve my comment, but confirming that this has been resolved ✅
|
Thanks for catching this. It was a line-ending issue. The upstream user.handlebars file uses CRLF line endings, and my edited copy had been converted differently, which caused GitHub to show essentially the entire file as modified. I restored the upstream CRLF formatting and cleaned up the branch. The PR now only contains the actual functional changes in:
I also removed the fork-specific config.json changes so they are no longer part of the PR. The resulting diff is now limited to the intended ScriptTask fixes. |

Fix ScriptTask UI compatibility and editor functionality for current MeshCentral versions
Summary
This pull request fixes several compatibility issues in the ScriptTask plugin that prevent normal operation on current versions of MeshCentral.
While testing the plugin against the latest MeshCentral release, several UI actions, scheduled task functions, and the script editor were either non-functional or generated server-side errors. This PR restores those features while preserving the plugin’s original workflow and behavior.
⸻
User Interface
Toolbar Improvements
⸻
Script Editor
Save Functionality
Fixed an issue where editing a script did not properly save changes on current MeshCentral versions.
Changes include:
⸻
Scheduled Jobs
Scheduling
Schedule Deletion
⸻
Backend Improvements
Added validation before processing script content to prevent orphaned or invalid scheduled jobs from causing server exceptions.
This prevents errors similar to:
TypeError: Cannot read properties of undefined (reading 'content')
and previously:
TypeError: Cannot read properties of undefined (reading 'match')
when scheduled jobs reference missing or deleted scripts.
Instead of crashing, invalid scheduled jobs are now skipped safely.
⸻
Compatibility
These changes improve compatibility with current MeshCentral releases while maintaining backward compatibility with the existing plugin design.
No changes were made to the overall plugin workflow or user experience beyond restoring broken functionality.
⸻
Testing Performed
The following functionality has been tested successfully:
Script Management
Execution
History
General
⸻
Goal
The goal of this pull request is to restore compatibility with current MeshCentral releases while preserving the original functionality and user workflow of the ScriptTask plugin.
This pull request intentionally focuses on bug fixes and compatibility improvements without introducing new features or altering the existing design.
Future enhancements—such as additional UI modernization, dark mode improvements, and code cleanup—can be submitted separately to keep this pull request focused and easy to review.