UI Action 'Discover Now' is triggering discovery on the whole schedule, when the schedule is using behavior of multiple phasesDescriptionUI Action 'Discover Now' is triggering discovery on the whole schedule, when the schedule is using behavior of multiple phasesSteps to Reproduce > Define a discovery schedule using behavior of multiple phases, for example: phase 0 SNMP only, phase 1 WMI only> Define a large IP range on the schedule> Open a CI that is in the IP range, click on "Discover Now"> Monitor Shazzam launched.The first Shazzam output probe has a single IP in the IP range, which is correct.This probe is for phase 0.The second Shazzam output probe has the entire IP range of the schedule, which is wrong.This probe is for phase 1.WorkaroundIf you are able to upgrade, review the "Intended Fix Version" section below below to determine the versions that have a permanent fix. The workaround is to use "Quick Discovery" button on the Discovery Schedules table to start a discovery to a single device.Another workaround for this issue is to apply the PRB fix manually on customer's instance. To apply the PRB fix manually on customer's instance, make the following code changes to the 3 below listed Script Include scripts : 1. 'StartDiscovery' Script : sys_script_include_092266f60ab30150007b0466d082578c.xml Location of change: discoverFromSchedule: function(ip, samePhase, sensor) discoverFromSchedule: function(ip, samePhase, sensor){ .... /* Existing Code block */ if (!this.schedule.discoverWebService()) { // cancel discovery if midServer is not valid if (this._specificMid() && !this.schedule.midServer.valid) { this._cancelDiscoveryAndLogError(); return; } /* ADD the following if block here*/ if (ip) this.status.setIPFromCI(ip); /* followed by Existing Code */ var dl = new ShazzamLaunch(this.status, this.schedule); dl.launch(ip, samePhase, sensor); .... }// end of discoverFromSchedule 2. 'DiscoveryStatus' script : sys_script_include_0923b5ee0ab30150007c408f74342949.xml Add the following two functions 'setIPFromCI' & 'getIPFromCI' just before the end of this Script/** Sets the IP Address of the CI being discovered in the scratchpad as this information may not be available in the * status if discovery is triggered from the CI form and the associated IP is part of a discovery schedule that uses * a multi-phase behavior.*/ setIPFromCI: function(ip) { var gr = this.getGlideRecord(); if (!gr) return; gr.scratchpad.discoverNowIp = ip; gr.setWorkflow(false); gr.update(); }, /** Returns IP address of the CI being discovered if it was stored in the scratchpad*/ getIPFromCI: function() { var gr = this.getGlideRecord(); if (!gr) return; var ip = gr.scratchpad.discoverNowIp; if (!ip) return; return '' + ip; }, //Followed by existing Code type: 'DiscoveryStatus'}); 3. 'ShazzamLaunch' script : sys_script_include_37d16e0b0a0a0b8200ebb61333ec7d71.xmlLocation of change: launch: function(ip, samePhase, sensor) method Inside the methodlaunch: function(ip, samePhase, sensor) {...../* Existing Code */// Log protocols disabled by the Discovery Configuration Console if (GlidePluginManager.isRegistered('com.snc.discovery')) { var disabledProtocols = DiscoConfigConsoleUtil.getDisabledProtocols(); if (JSUtil.notNil(disabledProtocols)) { var msg = 'The following protocols have been disabled via the Configuration Console and will not be scanned by Shazzam: ' + disabledProtocols.join(", "); this._logWarning(msg); } } /* Add the following if block */// For discoveryFromCI using behavior, fetch the IP address for next phase(s) from status.scratchpad // otherwise the next phase will scan the full range defined in the schedule instead of IP for just that CI if (!ip){ ip = this.status.getIPFromCI(); } /* Followed by existing block */// now fire our shazzam probes... for (var midName in portProbes) this.fireShazzamProbe(portProbes[midName], ip, sensor); return this.probesLaunched; } catch(ex) { var errMsg = 'Script error while attempting to launch Shazzam '; this._logError(errMsg + ex.msg); this.errorManager.addError(new SNC.DiscoveryErrorMsg('SN-5900', this.ERROR_KEY, this.status.sysID, null, errMsg, null)); } },// end of launch method Related Problem: PRB1477757