jenkinsci / xray-connector-plugin

Xray Test Management Connector for Jenkins
https://plugins.jenkins.io/xray-connector/
MIT License
16 stars 13 forks source link

Remove usages of Prototype from Xray #75

Closed basil closed 8 months ago

basil commented 1 year ago

See this blog post for details. Prototype will eventually be removed from Jenkins core, and to prepare for this transition, this plugin must be migrated away from Prototype. The blog post contains instructions on how to find and eliminate usages of Prototype. In this plugin, the following usages of Prototype have been identified. This may not be an exhaustive list:

com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                                    $fieldCloudHelperWrapper.hide();
com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                                    $fieldCloudHelperWrapper.show();
com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                                    $fieldServerHelperWrapper.hide();
com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                                    $fieldServerHelperWrapper.show();
com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                                    $fieldWrapper.hide();
com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                                    $fieldWrapper.show();
com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                            observeNewInstance.observe(document.querySelector('div[name="serverInstances"]').parentNode, {
com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                            Q(lastInstanceAdded).on('change',function(e){
com/xpandit/plugins/xrayjenkins/model/ServerConfiguration/config.jelly:                        Q('select[name="hosting"]').on('change',function(e){
com/xpandit/plugins/xrayjenkins/task/XrayExportBuilder/config.jelly:                        $selectParent.hide();
com/xpandit/plugins/xrayjenkins/task/XrayExportBuilder/config.jelly:                        $selectParent.show();
com/xpandit/plugins/xrayjenkins/task/XrayImportBuilder/config.jelly:                    $selectParent.hide();
com/xpandit/plugins/xrayjenkins/task/XrayImportBuilder/config.jelly:                    $selectParent.show();
com/xpandit/plugins/xrayjenkins/task/XrayImportBuilder/config.jelly:                        Q('#selectFormat_${descriptor.defaultBuildID()}').on('change',function(e){
com/xpandit/plugins/xrayjenkins/task/XrayImportBuilder/config.jelly:                        Q('#selectFormat_${descriptor.defaultBuildID()}').on('filled', function(){
com/xpandit/plugins/xrayjenkins/task/XrayImportBuilder/config.jelly:                        Q('#selectInstance_${descriptor.defaultBuildID()}').on('change',function(e){
com/xpandit/plugins/xrayjenkins/task/XrayImportFeatureBuilder/config.jelly:                        $selectParent.hide();
com/xpandit/plugins/xrayjenkins/task/XrayImportFeatureBuilder/config.jelly:                        $selectParent.show();

CC @dmoduarte

basil commented 1 year ago

CC @Russell616

Lima21 commented 8 months ago

Hi @basil,

I'm Gonçalo Lima, developer of Xray.

Thank you for letting us know that prototype js has been removed from Jenkins.

We've checked the Jenkins 2.426.2 and Xray connector works.

I think the list you share contains false positives. Here is a breakdown of each line you shared in your comment:

serveraddress serverconfig

Those are JQuery instances. Do you need us to perform other checks?

Best, Gonçalo Lima

basil commented 8 months ago

Thank you for confirming.