How to add Workflow Stages on Service Portal

Donald Small1
Tera Expert

I have a requirement to add Workflow Stages to the Service Portal, so that non-ITIL users can follow a Request.  There is an OOTB service portal widget called "Request Item Workflow Stages" that sounds exactly like what I want, but it doesn't work.  I opened a HI Portal ticket on this and get the following response:

**ISSUE SUMMARY:** Unable to add the 'Request Item Workflow Stages' widget to the ticket page. **Desired Behavior** To be able to add the widget to the page. **Unexpected/Actual Behavior** An error is displayed in place of the widget **MOST PROBABLE CAUSE:** This is the expected behavior, that particular widget is no longer in use and it is reccommended not to try to use it. **SOLUTION PROPOSED:** The 'Request Item Workflow Stages' widget was called by other widgets and wasn't meant to be added to pages in the past but it is no longer being used so we don't reccommend trying to.

This is not really a great proposed solution IMO.  Has anyone else implemented something similar?  If so, would you mind sharing your knowledge?

 

Thanks,

Donald

2 REPLIES 2

Jaspal Singh
Mega Patron
Mega Patron

Hi Donald,

 

If you are using Ticket Fields widget something that appears to the right like below then you can clone the widget & add something as below.

find_real_file.png

 

Look for 

if(table == 'sc_req_item'){



& replace it with

if(table == 'sc_req_item'){
var fields = $sp.getFields(gr,'number,state,stage,sys_created_on');

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

 

 

Tim Grindlay
Kilo Sage

Old thread, but I was looking at that widget today. I'm no service portal export but it looks like it's intended to be embedded?

I managed to get it working by changing a few lines in the server script. You jus have to provide it with the sys_id of the request item.

//Request sys_id can be passed as an option 
	//By default URL parameter is used
	var req_item_id = $sp.getParameter('sys_id');
	
	
  //  req_item_id = JSUtil.nil(options.req_item_id + '') ? '' : options.req_item_id + '';
  //  if (!req_item_id) {
  //      req_item_id = JSUtil.nil(input.req_item_id + '') ? '' : input.req_item_id + '';
  //  }
    if (!req_item_id) {
        data.error = gs.getMessage("Request Item Not Provided");
        return;
    }