Unable to link incidents or problems to closed change requests


Description

Unable to link incidents or problems to closed change requests, because of fixed query portion in Add Change Request modal does not allow removal of fixed query active=true

Steps to Reproduce

1. Select a Problem or Incident record where the parent field is empty.
2. Go to related list tab: "Change Requests"
3. click Add button (opens modal "Add Change Requests")
4. Remove the active=true portion of the query.
Expected: Add Closed Change Requests to results
Actual: Cannot remove the active=true portion of the query

Workaround

Modify script include: BulkAddChangeRequest sysId: 9fd79c0c877b13005087af1e36cb0b93

from:

	getURL: function(){
		var sysId = this.getParameter(this.PARAMS.SYSID);
		var url = new GlideURL("task_add_change_req.do");
		var fixedQuery = "active=true^parentISEMPTY";
		url.set(this.PARAMS.SYSID, sysId);
		url.set(this.PARAMS.VIEW, "default");
		url.set(this.PARAMS.NOSTACK, "true");
		url.set(this.PARAMS.QUERY, "ORDERBYDESCsys_created_on");
		url.set(this.PARAMS.TABLE, "change_request");
		url.set(this.PARAMS.FIXEDQUERY, fixedQuery);
		return url;
	},

To:

	getURL: function(){
		var sysId = this.getParameter(this.PARAMS.SYSID);
		var url = new GlideURL("task_add_change_req.do");
		url.set(this.PARAMS.SYSID, sysId);
		url.set(this.PARAMS.VIEW, "default");
		url.set(this.PARAMS.NOSTACK, "true");
		url.set(this.PARAMS.QUERY, "active=true^ORDERBYDESCsys_created_on");
		url.set(this.PARAMS.TABLE, "change_request");
		url.set(this.PARAMS.FIXEDQUERY, "parentISEMPTY");
		return url;
	},



Related Problem: PRB1450983