I'm sure that
Script type
JavaScript
The problem
Bug: Script names are incorrectly handled during export and when renaming/copying scripts
I found two issues with script names in the Script Adapter, specifically with JavaScript scripts.
1. Script names are incorrectly exported
When exporting JavaScript scripts, the script name is not preserved correctly.
For example, the script:
PW-TV-Control_v0.6_VH_OG1
is exported with the filename:
instead of:
PW-TV-Control_v0.6_VH_OG1.json
Other examples from the screenshot show similar problems, where parts of the script name are lost or dots in version numbers are replaced with underscores.
For example:
PWSW-Master-Slave_v0.10_Büro
becomes:
PWSW-Master-Slave_v0_10_Büro.json
and:
becomes:
The most severe case is when only the version number is used as the filename, e.g. 6.json.
Expected behavior:
The complete script name should be preserved during export:
PW-TV-Control_v0.6_VH_OG1.json
PWSW-Master-Slave_v0.10_Büro.json
HK-Balkontür_v0.1.json
2. Renaming or copying a script automatically creates a folder
When renaming or copying a script, a new folder with the script name is automatically created, and the script is placed inside this folder.
Is there a possibility to change this behavior?
Ideally, renaming, creating, or copying a script should not automatically create a new folder. A folder should only be created when the user explicitly creates one.
Expected behavior:
- Preserve the complete script name during export.
- Do not replace
. with _ in script names.
- Do not export only parts of the script name, such as
6.json.
- Do not automatically create a folder when renaming or copying a script.
- Only create folders when explicitly requested by the user.
iobroker.current.log (in debug mode!)
No response
Version of nodejs
v22.23.2
Version of ioBroker js-controller
10.9.8 NPM?
Version of adapter
9.0.18
I'm sure that
Script type
JavaScript
The problem
Bug: Script names are incorrectly handled during export and when renaming/copying scripts
I found two issues with script names in the Script Adapter, specifically with JavaScript scripts.
1. Script names are incorrectly exported
When exporting JavaScript scripts, the script name is not preserved correctly.
For example, the script:
is exported with the filename:
instead of:
Other examples from the screenshot show similar problems, where parts of the script name are lost or dots in version numbers are replaced with underscores.
For example:
becomes:
and:
becomes:
The most severe case is when only the version number is used as the filename, e.g.
6.json.Expected behavior:
The complete script name should be preserved during export:
2. Renaming or copying a script automatically creates a folder
When renaming or copying a script, a new folder with the script name is automatically created, and the script is placed inside this folder.
Is there a possibility to change this behavior?
Ideally, renaming, creating, or copying a script should not automatically create a new folder. A folder should only be created when the user explicitly creates one.
Expected behavior:
.with_in script names.6.json.iobroker.current.log (in debug mode!)
No response
Version of nodejs
v22.23.2
Version of ioBroker js-controller
10.9.8 NPM?
Version of adapter
9.0.18