• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • scriptler-plugin
    • None

      As a new user, when creating a script via the web UI for the first time, it's quite unclear what the "Id" and "Name" fields are about. If seems "Id" is supposed to be the file name, and "Name" the name as displayed to the user. Please add according descriptions below those two fields.

          [JENKINS-24034] Clarify meaning of "Id" and "Name" fields

          +1 even after having used the plugin for a while I have to always stop and think what Id and name mean. I would suggest changing Id to simply Script.

          Ioannis Moutsatsos added a comment - +1 even after having used the plugin for a while I have to always stop and think what Id and name mean. I would suggest changing Id to simply Script.

          One thing I noticed is that it seems in the past scripts were sorted by their names. But now there's even a XStream alias, to a new ID sorter, which is the default one now.

          So if I understand it correctly, scripts are stored in the cache, and also referenced (e.g. when another plug-in wants to load it) but their ID. Then in the UI, the values are sorted by their ID's, and not by what is displayed to users.

          Wouldn't it make more sense to keep caching and using the ID for retrieval. But then for displaying, I think if you have, say, 200 scripts, finding them can be quite hard if they are not sorted alphabetically.

          Before I submit an issue to sort by name, could someone clarify if the ID is used only for internal management, or if there are other use cases? Maybe we could even use a random UUID generator, and drop the ID in the UI... that way users wouldn't have to bother about it.

          Bruno P. Kinoshita added a comment - One thing I noticed is that it seems in the past scripts were sorted by their names. But now there's even a XStream alias, to a new ID sorter, which is the default one now. So if I understand it correctly, scripts are stored in the cache, and also referenced (e.g. when another plug-in wants to load it) but their ID. Then in the UI, the values are sorted by their ID's, and not by what is displayed to users. Wouldn't it make more sense to keep caching and using the ID for retrieval. But then for displaying, I think if you have, say, 200 scripts, finding them can be quite hard if they are not sorted alphabetically. Before I submit an issue to sort by name, could someone clarify if the ID is used only for internal management, or if there are other use cases? Maybe we could even use a random UUID generator, and drop the ID in the UI... that way users wouldn't have to bother about it.

          Id is not only internal, if you reference a script from within the TokenMacro plugin, then the id must be used: https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin#ScriptlerPlugin-TokenMacroSupport

           

          The name is only there for display purposes 

          Dominik Bartholdi added a comment - Id is not only internal, if you reference a script from within the TokenMacro plugin, then the id must be used: https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin#ScriptlerPlugin-TokenMacroSupport   The name is only there for display purposes 

          Thanks for clarifying domi.

          I think we can add help files here https://github.com/jenkinsci/scriptler-plugin/blob/5308c27816ed8da5924eedcc6cb12c5655a7e5b3/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/scriptsettings.jelly#L39 or then add some description before, in the intro text. What do you think? (cc ioannis)

          Maybe for ID: "A unique identifier, used to retrieve a reference for the script internally in the plug-in, and also by other plug-ins.", and for Name: "Script display name. Used in the user interface.".

          Bruno

          Bruno P. Kinoshita added a comment - Thanks for clarifying domi . I think we can add help files here https://github.com/jenkinsci/scriptler-plugin/blob/5308c27816ed8da5924eedcc6cb12c5655a7e5b3/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/scriptsettings.jelly#L39 or then add some description before, in the intro text. What do you think? (cc ioannis ) Maybe for ID: "A unique identifier, used to retrieve a reference for the script internally in the plug-in, and also by other plug-ins.", and for Name: "Script display name. Used in the user interface.". Bruno

            domi Dominik Bartholdi
            sschuberth Sebastian Schuberth
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: