Planning Console - Copy partial project - how to adjust the filter\display field

Jonathan Monks
Tera Guru

How can I change what is showing In the task filter in the copy partial project form?

JonathanMonks_0-1740650344679.png

At the moment it shows the short description. I want it to show it in the following format instead:

 

[number] - [short_description]

 

I'm not sure if this is doable. I wouldn't mind it it only showed the short description provided you could search for the number as well, but I believe the search is done through whatever is displayed.

 

With some help from ServiceNow, I have managed to find an angular ng-template with an id of copyPartialProject which is the form that is displayed when "Copy partial project" is selected in the planning console. However, it doesn't look like there is anywhere to filter inside it.

 

If you open Pc Header (the planning console header widget the angular ng-template is attached to) there is some code at the bottom that appears to govern what is displayed in the copy partial project form.

 

 

 

  scope.openCopyPartialProjectModal = function() {
      scope.data.isMoreActionsOpen = false;
      var _openCopyPartialProjectModal = function() {
          resetPartialProjectModalData();
          _openPopupModal(scope, 'copyPartialProject', function() {
              var ele = $('#task');
			  var plannedTaskQuery = 'sys_class_nameIN'+PWConfig.sysClassName+','+PWGanttConfig.CHILD_SYS_CLASS;
			  if(scope.data.isDataSeparationEnabled && scope.data.plannedTaskDataSepQuery != '') {
			  	plannedTaskQuery += '^' + scope.data.plannedTaskDataSepQuery; // display only accessible projects and project tasks.
			  }
              _initializeSelect2({
                  $element: ele,
                  placeholder: scope.data.messages.selectTaskPlaceholder,
                  url: '/api/now/table/planned_task',
                  fields: 'sys_id,short_description',
                  query: plannedTaskQuery,
                  displayField: 'short_description'
              });

              $(ele).select2('focus');

              ele.on('change', function(e) {
                  scope.data.copyPartialProjectModal.task = e.val;
                  scope.data.copyPartialProjectModal.isTaskEmpty = scope.data.copyPartialProjectModal.task ? false : true;
              });
          });
      };

 

 

I have tried editing the displayField in a few ways but I can't get it to display both.

 

Is this possible?

0 REPLIES 0