Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

Work Center - Customize Service Requests

  • 1.  Work Center - Customize Service Requests

    Posted Tue March 02, 2021 12:23 PM
    Hi ,
    I would like to know whether there is any way to add some fields (OOB or custom) to the Service Request work center ? I understand we need to customize html and/or java script however is there any steps on how to achieve the same , like which files should be modified.  I'm trying to add the attribute in the Issues sections somewhere beneath Affected Person field.

    Thanks

    ------------------------------
    Vijayalakshmi Laxman
    ------------------------------

    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Work Center - Customize Service Requests

    Posted Sat December 11, 2021 10:22 AM
    Edited by System Admin Wed March 22, 2023 11:43 AM
    Hi
    My Knowledge on this.
    Technology Stack
    :

    Maximo Work Center is built on top of Google Polymer, Google Web Components and Latest Web Technology stack to bring the Rich and Responsive UI.
    IBM has built their own Custom Elements for Maximo Work Centers which are called as Maximo Cards.
    Work Center Apps communicates with Maximo using REST API.
    So, to customize Maximo Work Center Apps we need to be familiar with HTML5, JavaScript, CSS, Polymer, Web Components and Maximo REST API.

    Basic Customization (Configuring Work Center):
    IBM provides inbuilt Design Mode starting from Maximo 7.6.1.1 for Basic Level of Customization.

    Enabling Design Mode in Work Center Apps is configurable using Security Groups.

    Advanced Customization:
    IBM allows modifying the HTML, Javascript files. For e.g. if any customization is to be carried out for work supervisor work center then the changes needs to be made in the HTML, JavaScript files located in the following path: {MaximoInstallLocation}/SMP/maximo/applications/maximo-x/script/maximocards/workorder/supervisor/common/maximo-supervisor-details/

    • maximo-supervisor-details.html – Contains the code for UI Elements such as Tiles, Badges and Buttons.
    • maximo-supervisor-details.js – Contains the code for Events such as Save, Apply Update for Each Field etc…
    • maximo-supervisor-details -css.html – Contains the code for UI Styling of this screen.

    After saving changes to the files, we must build and deploy maximo-x.ear to our application server to see the changes reflecting in Work Center application.


    #Maximo
    #AssetandFacilitiesManagement


  • 3.  RE: Work Center - Customize Service Requests

    Posted Thu December 16, 2021 04:48 PM
    Edited by System Admin Wed March 22, 2023 11:44 AM

    Hi Dharani Dharan Eswaran,
    Thank you for your explation but I'm still need more explation if it's posable 
    I already have added a new field only design by modifided  maximo-supervisor-details.html 
    but I'm still need to know how to display data in my field and how to update data there
    I have tried a lot to modifieded in maximo-supervisor-details.js
    but without any results
    my new field is "test_desc"



    // line 90
    // I have added name of my new field "test_desc"
    attributeList: {
    			type: String,
    			value: 'workorderid,origrecordid,wonum,worktype,description,description_longdescription,test_desc,status,status_maxvalue, wopriority, estdur, actstart,actfinish,schedstart,schedfinish,statusdate,reportdate,targstartdate,targcompdate, assetnum,asset.description,asset._imagelibref,location,asset.isrunning, location.description,location.location,location._imagelibref,parent.wonum,parent.description, glaccount,siteid,onbehalfof._imagelibref,onbehalfof.displayname, uxlead._imagelibref,uxlead.displayname,ownerperson._imagelibref, ownerperson.displayname,uxsupervisor.displayname, uxsupervisor._imagelibref, workorderownergroup.description,site.description,rel.labtranstimerstatus{*},origrecordclass,origticket.description,origwo.description,failure.description,wo_worktype.wtypedesc,reportedby.displayname,reportedby._imagelibref,synonymdomain.description,reportedby.primarysms,reportedby.primaryemail,reportedby.primaryphone,onbehalfof.primarysms,onbehalfof.primaryemail,onbehalfof.primaryphone,uxlead.primarysms,uxlead.primaryemail,uxlead.primaryphone,ownerperson.primarysms,ownerperson.primaryemail,ownerperson.primaryphone,uxsupervisor.primarysms,uxsupervisor.primaryemail,uxsupervisor.primaryphone,relatedreckey,relatetype,jpnum,jobplan.description,pluscjprevnum,problemcode,problem.description,parent.status,failurecode,failure.description_longdescription,remarkdesc,worktype.promptfail--worktypeprompt,rel.moddowntimehist{*},classstructure.description--class_description,maxvar.labtrnallowanycrft,workorderownergroup.persongroup,workorderownergroup._imagelibref,istask,taskid,serviceaddress.saddresscode,serviceaddress.description,serviceaddress.formattedaddress,location.saddresscode,location.serviceaddress.addresscode,location.serviceaddress.formattedaddress,location.serviceaddress.description,inspformnum,inspectionformall.name--inspformname,inspectionresult.resultnum--inspresult,woactivity{rel.inspectionresult{resultnum}},classstructureid,classstructure.classificationid--classificationid,classstructure.hierarchypath--classsturchierarchypath,amcrew.amcrew,amcrew.description,serviceaddress.referencepoint,serviceaddress.directions,serviceaddress.directions_longdescription'
    		},


    here I have added my field like others in the switch case

    // line 1000
    
    
    	_applyEdits: function(e){
    		if(this.createWO){
    			this._setCachedValue(e);
    			return;
    		}
    		 switch(e.detail.dataset.scopeId){
                           case 'test_desc':
                	       var dataToUpdate = {'test_desc': e.target.value};
    			this._updateWO(dataToUpdate, this.collection);
                              break; 
    


    And I have modified  here

    // line 1803
    
    /**
    	 *  prepares the detail page to display a new record 
    	 */
    	showDetail: function(workOrder,  collection, readOnly, sourcePage, panelName, displayTab, newWO){
    		this.panelName = panelName;
    		if(sourcePage === 'create'){
    			var self = this;
    			$j(this.$.contentSelector).attr('add-class','disableLink');
    			this.cachedRecord ={};
    			this.createWO = newWO;
    			this._disabledPageNavigation(true);
    			this.plandataexists = false;
    			this.actionName = '';
    			this.$.wopriority.newTile = this.createWO;
    			this.record = workOrder;
    			this.cachedRecord['uxsupervisor'] = this.record.reportedby;
    			this.cachedRecord['siteid'] = this.record.siteid;
    			if(this.record.wopriority === undefined){
    				this.$.wopriority.newTile = this.createWO;
    		  		this.$.wopriority.emptyRecord = true;
    		  	}
    			this.refreshTiles();
    			this.dataLoaded = false;
    			if(self.$.relatedRecordsWOTable.collection.totalCount>0){
    				this.$.relatedRecordsWOCollection.refreshRecords().then(function(response){
    					self.$.relatedRecordsWOTable.$.wrapperNoData.style.display='block';
    					$j(self.$.relatedRecordsWOTable.$.nodata).removeClass('hideElement');
    					$j(self.$.relatedRecordsWOTable.$.nolabel).removeClass('hideElement');
    					self.$.relatedRecordsWOTable.collection.collectionData=[];
    					self.$.relatedRecordsWOTable.$.table.$.rowRepeat.items=[];
    					self.$.relatedRecordsWOTable.collection.totalCount=0
    					self.dataLoaded = true;
    				});
    			}
    		}else{
    			this.assetFlag = false;
    			this.locationFlag = false;
    			this.createWO = false;
    			$j(this.$.contentSelector).removeAttr('add-class');
    			this._refreshRecord();
    		}
    		this.panelName = panelName;
    		this.collection = collection;
    		this.recordLight = workOrder;	
    		this.readOnly = readOnly;
    		this.sourcePage = sourcePage;
    		this.newWO = newWO;
    		this.$.assetimg.newTile = newWO;
    		this.$.statusTile.newTile = newWO;
    		this.$.wopriority.newTile = newWO;
    		this.$.locationimg.newTile = newWO;
    		this.$.workfailure.newTile = newWO;
    		this.$.workproblem.newTile = newWO;
    		this.$.worktype.newTile = newWO;
    // I have added my field here
    		this.$.test_desc.newTile = newWO;
    		this.$.parentwo.newTile = newWO;
    		this.$.originRecd.newTile = newWO;
    		this.$.sitedesc.newTile = newWO;
    		this.$.schedstart.newTile = newWO;
    		this.$.schedfinish.newTile = newWO;
    		this.$.targstartdate.newTile = newWO;
    		this.$.targcompdate.newTile = newWO;
    		this.$.durationTile.newTile = newWO;
    		this.$.actstart.newTile = newWO;
    		this.$.actfinish.newTile = newWO;
    		this.$.reportbyimg.newTile = newWO;
    		this.$.reportdate.newTile = newWO;
    		this.$.onbehalfof.newTile = newWO;
    		this.$.leadimg.newTile = newWO;
    		this.$.ownerimg.newTile = newWO;
    		this.$.ownergrp.newTile = newWO;
    		this.$.superimg.newTile = newWO;
    		this.$.jobplan.newTile = newWO;
    		this.$.amcrew.newTile = newWO;
    		// add required details to session Cache
    		if(!this.createWO){
    			sessionStorage.setItem('WORecordLight', JSON.stringify(this.recordLight));
    			sessionStorage.setItem('WOSourcePage', this.sourcePage);
    			sessionStorage.setItem('WOCollectionId', this.collection.id);
    			sessionStorage.setItem('WOCollectionQueryWhere', JSON.stringify(this.collection.queryWhere));
    		}
    		
    		if(newWO){
    			this.assetFlag = false;
    			this.locationFlag = false;
    		}
    		
    		var sectionId = 'section_details';
    		this.reportTimeAction = false;
    		if(!displayTab || displayTab === 'details'){
    			this.resetContentSelectorDefault();
    			this._loadMultiAssetLocData();
    			if(this.isAuthorized('MXAPIWODETAIL:SAVE')) {
    				this.woButtonActionsVisibility = false;
    			}else{
    				this.woButtonActionsVisibility = true;
    			}
    		}else if( displayTab === 'comments'){
    			sectionId = 'section_comments';
    	        this.resetContentSelectorComment();
    		}
    		else if(displayTab === 'reportTime' || displayTab === 'approveTime'){
    			sectionId = 'section_reportedwork';
    			this.reportTimeAction = true; 
    			var currentIndex = $j(this.$['maximo_workorder_reportedwork']).index();
    			if(displayTab === 'reportTime'){
    				var self = this;
    				self.async(function(){
    					$j(self).find('#supervisorreportedwork')[0].fire('add-reportedwork-time-card');
    			},100);
    			}			
    	        this.resetContentSelectorReportedWork(currentIndex);
    		}
    		this._showSubTab(sectionId);
    		if(this.createWO){
    			$M.toggleWait(false);
    		}
    		this.fire('workscape-design-views',{'hasDesignMode':false});
    		var self = this;
    		this._setRequiredTile().then(function(records){
    			if(newWO){
    				self._disableSaveButton();
    			}
    			
    		});
    	},
    

    Please help me if it's possible
    Thank you



    ------------------------------
    Hussin Mahmoud
    ------------------------------

    Attachment(s)



  • 4.  RE: Work Center - Customize Service Requests

    Posted Fri December 17, 2021 07:25 AM
    WC are actually moving from Polymer to Graphite as Polymer has been deprecated. I cant get a straight answer out of IBM as to how much has been moved already and how much is still to be moved (in 7.6.1.2). But from what I understand any work done while its still Polymer risks being lost or breaking any future Upgrades/IFIX when they do move fully to Graphite. Just Giving a heads up. ;-)

    Miller

    ------------------------------
    David Miller
    Managing Partner - Maximo Consultant
    Enterprise Integration Partners LLC
    ------------------------------



  • 5.  RE: Work Center - Customize Service Requests

    Posted Mon December 20, 2021 08:58 AM
    For 7.6.1.2 you need to have Maximo Mobile installed (which requires MAS entitlements) and some apps will only exist in MAS. The new Role Based Applications built on Graphite aren't intended to be a like for like replacement of the work centers we have today so it'd be really hard to give an accurate progress response. There will be some functionality that exists in the work center that might not make it into the role based applications for a period of time (if ever) and there is net new functionality that exists only in the role based applications that won't make it into the work centers. The biggest example so far is around inspections and some of the new functionality being added there that isn't planned to be added to the Conduct an Inspection work center.

    As a FYI, today we have Technician (Work Execution), Inspections (Conduct an Inspection), Service Request (Submit a Service Request), and Work Approvals (loosely Work Supervision) apps where the first name is the Role Based Application name and the second in parentheses is the most equivalent Work Center. They're all being created as new apps though. They are not replacing the existing work center directly so you could utilize both if desired. You still run the risk that an update to those apps to fix issues may impact your customization. And you're correct that any customizations won't move to the new framework.

    ------------------------------
    Steven Shull
    ------------------------------



  • 6.  RE: Work Center - Customize Service Requests

    Posted Tue March 29, 2022 05:51 AM
    Gentlemen,

    Is there a way SSO can be enabled for Workcenters ?

    ------------------------------
    Venkataraman Guruswamy
    ------------------------------



  • 7.  RE: Work Center - Customize Service Requests

    Posted Tue March 29, 2022 08:17 AM
    If you are on 7.6.0.8 or higher and configure the security constraints in the web.xml to utilize application server security and map the security on the application like you do with core Maximo then SSO should work. Whether that's LDAP or SAML, the application server takes over managing authentication. We cover how to configure the web.xml for work centers here: https://www.ibm.com/support/pages/deploying-maximo-work-centers-ldap-and-non-ldap

    That technote is a bit verbose as it covers other scenarios as well (such as changing the context root for your Maximo application) which you should not change unless that applies to you.

    ------------------------------
    Steven Shull
    ------------------------------



  • 8.  RE: Work Center - Customize Service Requests

    Posted Tue March 29, 2022 01:18 PM
    Thanks Steve.

    ------------------------------
    Venkataraman Guruswamy
    ------------------------------



  • 9.  RE: Work Center - Customize Service Requests

    Posted Mon July 04, 2022 06:02 AM
    Hello David,
    We would like to get more details about the polymer/graphite move. Would you have some non confidential "news" about this move ? And would you know if the "Inspection Form" will become easily customizable ? Basically, our current client would like to add a boolean flag at two levels : on the inspection form itself and at the "questions" level (steps of inspection). Will the move to Graphite make this kind of customization easier ?

    ------------------------------
    Hugues LOMBARD
    Managing Applications Consultant
    CAPGEMINI
    ------------------------------



  • 10.  RE: Work Center - Customize Service Requests

    Posted Tue July 05, 2022 09:57 AM

    I'd expect this to be announced at Maximo World publicly with our plans for when each Work Center will be replaced by the Graphite based applications. I don't think there's anything more I can share yet.

    Regarding customizing the Inspection applications, that might still be difficult due to the design of Inspections. For most of the applications, the Graphite application provides much greater configuration capabilities than we had with work centers. Adding or removing fields, adding new pages, etc. in most applications would be easy to do.

    You'd be able to display header information on the inspection result (such as information about the work order or asset) but adding things to the question itself I suspect would still be difficult to do. The UI for Inspection questions are built dynamically with special controls just for inspections. Since we don't support modifying our controls, I don't think it'd be possible to display another boolean field. 



    ------------------------------
    Steven Shull
    ------------------------------