This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.
Does anyone have any good ideas or ways to populate the Actual Start based on earliest Labor entry and Actual finish based on Latest Labor entry for a work order?
Client before used trigger to set the values but Time Zone issues are causing this not to work. Could escalations be used, but i am not sure with an escalation how i would combine startdate and starttime in labtrans table..
Shannon Dale Sutton
What version
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of shannon sutton
Sent: 07 November 2012 14:44
To: MAXIMO@yahoogroups.com
Subject: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Does anyone have any good ideas or ways to populate the Actual Start based on earliest Labor entry and Actual finish based on Latest Labor entry for a work order?
Client before used trigger to set the values but Time Zone issues are causing this not to work. Could escalations be used, but i am not sure with an escalation how i would combine startdate and starttime in labtrans table..
Shannon Dale Sutton
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************
7.5
Shannon Dale SuttonMobile: 318-334-8002
________________________________
From: Ian Wright <ian.wright@gdfsuezep.co.uk>
To: "MAXIMO@yahoogroups.com" <MAXIMO@yahoogroups.com>
Sent: Wednesday, November 7, 2012 11:16 AM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
What version
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of shannon sutton
Sent: 07 November 2012 14:44
To: MAXIMO@yahoogroups.com
Subject: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Does anyone have any good ideas or ways to populate the Actual Start based on earliest Labor entry and Actual finish based on Latest Labor entry for a work order?
Client before used trigger to set the values but Time Zone issues are causing this not to work. Could escalations be used, but i am not sure with an escalation how i would combine startdate and starttime in labtrans table..
Shannon Dale Sutton
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************
Might be a job for automation scripts I created the script below a while ago and haven’t done anything much with it since.
I added the ACTFINISH line see below (underlined) to see what would happen, it did set the date for me but the labtrans relationship doesn’t find that last record but you could easily create a new relationship which would only return one record
There may be better ways of writing the code
I guess you would also need to detect a status or something to tell the script when to activate
PS the indents are important after the if’s
Hope this helps
Rgds Ian
from psdi.mbo import MboRemote
from psdi.mbo import MboConstants
from psdi.mbo import MboSetRemote
from java.util import Calendar
from java.util import Date
from math import *
B = mbo.getString("SNECONSTRAINT")
C = mbo.getString("TARGSTARTDATE")
if len(B) > 0:
targstart = mbo.getDate("SNECONSTRAINT")
else:
targstart = mbo.getDate("TARGSTARTDATE")
if len(C) > 0 or len(B) > 0:
dduration = mbo.getDouble("ESTDUR")
dd = int(floor(abs(dduration/8)))
mbo.setValue("ACTFINISH",mbo.getDate("LABTRANS.TRANSDATE"))
schedfin = targstart
cal=Calendar.getInstance()
cal.setTime(schedfin)
cal.add(Calendar.DATE, + dd)
schedfin = cal.getTime()
mbo.setValue("SCHEDFINISH",schedfin)
mbo.setValue("SCHEDSTART",targstart)
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of shannon sutton
Sent: 07 November 2012 16:19
To: MAXIMO@yahoogroups.com
Subject: Re: [MAXIMO List] Set ActStart/Actfinish from Labtrans
7.5
Shannon Dale SuttonMobile: 318-334-8002
________________________________
From: Ian Wright <ian.wright@gdfsuezep.co.uk<mailto:ian.wright%40gdfsuezep.co.uk>>
To: "MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>" <MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>>
Sent: Wednesday, November 7, 2012 11:16 AM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
What version
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>] On Behalf Of shannon sutton
Sent: 07 November 2012 14:44
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Subject: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Does anyone have any good ideas or ways to populate the Actual Start based on earliest Labor entry and Actual finish based on Latest Labor entry for a work order?
Client before used trigger to set the values but Time Zone issues are causing this not to work. Could escalations be used, but i am not sure with an escalation how i would combine startdate and starttime in labtrans table..
Shannon Dale Sutton
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************
Sharon
There was a maxvars setting that controls that in version 6 but I do not remember what it was. We turned it off since we were having issues with people reporting labor the next day and not updating the time. We ended up with actual start dates prior to the time the work order was submitted.
I cannot find my notes at the moment but I am pretty sure it is this setting. Not very intuitive by the name I would expect to see your system set to 1.
SUPPRESSACTCHECK
SYSTEM
0
Flag to suppress checking of work order actual dates
Kevin
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of shannon sutton
Sent: Wednesday, November 07, 2012 11:19 AM
To: MAXIMO@yahoogroups.com<mailto:MAXIMO@yahoogroups.com>
Subject: Re: [MAXIMO List] Set ActStart/Actfinish from Labtrans
7.5
Shannon Dale SuttonMobile: 318-334-8002
________________________________
From: Ian Wright <ian.wright@gdfsuezep.co.uk<mailto:ian.wright%40gdfsuezep.co.uk>>
To: "MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>" <MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>>
Sent: Wednesday, November 7, 2012 11:16 AM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
What version
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>] On Behalf Of shannon sutton
Sent: 07 November 2012 14:44
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Subject: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Does anyone have any good ideas or ways to populate the Actual Start based on earliest Labor entry and Actual finish based on Latest Labor entry for a work order?
Client before used trigger to set the values but Time Zone issues are causing this not to work. Could escalations be used, but i am not sure with an escalation how i would combine startdate and starttime in labtrans table..
Shannon Dale Sutton
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************
There is an option in org app --> options --> work order --> other org options
To set “actual start date “ on change status initiate or change status complete
But I don’t think this is what you want
Also in org app --> options --> labor options there is a future tolerance in hours which might be causing you issues with the time difference I had this problem when I was working with BP in Houston as we worked across many time zones
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************
Thanks Ian.. Looks like i need to spend a few weeks playing with Automated Scripting..
Shannon Dale SuttonMobile: 318-334-8002
________________________________
From: Ian Wright <ian.wright@gdfsuezep.co.uk>
To: "MAXIMO@yahoogroups.com" <MAXIMO@yahoogroups.com>
Sent: Wednesday, November 7, 2012 11:59 AM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Might be a job for automation scripts I created the script below a while ago and haven’t done anything much with it since.
I added the ACTFINISH line see below (underlined) to see what would happen, it did set the date for me but the labtrans relationship doesn’t find that last record but you could easily create a new relationship which would only return one record
There may be better ways of writing the code
I guess you would also need to detect a status or something to tell the script when to activate
PS the indents are important after the if’s
Hope this helps
Rgds Ian
from psdi.mbo import MboRemote
from psdi.mbo import MboConstants
from psdi.mbo import MboSetRemote
from java.util import Calendar
from java.util import Date
from math import *
B = mbo.getString("SNECONSTRAINT")
C = mbo.getString("TARGSTARTDATE")
if len(B) > 0:
targstart = mbo.getDate("SNECONSTRAINT")
else:
targstart = mbo.getDate("TARGSTARTDATE")
if len(C) > 0 or len(B) > 0:
dduration = mbo.getDouble("ESTDUR")
dd = int(floor(abs(dduration/8)))
mbo.setValue("ACTFINISH",mbo.getDate("LABTRANS.TRANSDATE"))
schedfin = targstart
cal=Calendar.getInstance()
cal.setTime(schedfin)
cal.add(Calendar.DATE, + dd)
schedfin = cal.getTime()
mbo.setValue("SCHEDFINISH",schedfin)
mbo.setValue("SCHEDSTART",targstart)
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of shannon sutton
Sent: 07 November 2012 16:19
To: MAXIMO@yahoogroups.com
Subject: Re: [MAXIMO List] Set ActStart/Actfinish from Labtrans
7.5
Shannon Dale SuttonMobile: 318-334-8002
________________________________
From: Ian Wright <ian.wright@gdfsuezep.co.uk<mailto:ian.wright%40gdfsuezep.co.uk>>
To: "MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>" <MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>>
Sent: Wednesday, November 7, 2012 11:16 AM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
What version
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>] On Behalf Of shannon sutton
Sent: 07 November 2012 14:44
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Subject: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Does anyone have any good ideas or ways to populate the Actual Start based on earliest Labor entry and Actual finish based on Latest Labor entry for a work order?
Client before used trigger to set the values but Time Zone issues are causing this not to work. Could escalations be used, but i am not sure with an escalation how i would combine startdate and starttime in labtrans table..
Shannon Dale Sutton
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************
Appreciate the feedback.. This is not really along the lines of what we are trying to accomplish..
There is a requirement for the Actual Start of the Work order to be the same date and time of the earliest labor transaction and the actual finish be set to the latest date and time of the labor transaction..
In 5.2 this was accomplished by using a DB trigger, but using a DB trigger is ignoring the Maximo MBO's and since the server is located in a different time zone than the user it is causing issues when the work order is being updated..
SELECT @v_first_labtrans_start = MIN(CAST(CAST(DBO.v_LABTRANS.STARTDATE AS DATE)AS DATETIME) + CAST(DBO.v_LABTRANS.STARTTIME AS TIME)) , @v_last_labtrans_finish = MAX(CAST(CAST(DBO.v_LABTRANS.FINISHDATE AS DATE) AS DATETIME) + CAST(DBO.v_LABTRANS.finishtime AS TIME)) FROM DBO.v_LABTRANS WHERE v_LABTRANS.siteid=@v_siteid and v_LABTRANS.REFWO = @v_refwo GROUP BY v_LABTRANS.REFWO UPDATE dbo.workorder SET actstart = dateadd(hh,-2,@v_new_start), actfinish = dateadd(hh,-2,@v_new_finish) from dbo.workorder WHERE workorder.siteid = @v_siteid and workorder.wonum = @v_refwo
________________________________
From: Kevin Egolf <kegolf@techopsolutions.net>
To: "MAXIMO@yahoogroups.com" <MAXIMO@yahoogroups.com>
Sent: Wednesday, November 7, 2012 12:02 PM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Sharon
There was a maxvars setting that controls that in version 6 but I do not remember what it was. We turned it off since we were having issues with people reporting labor the next day and not updating the time. We ended up with actual start dates prior to the time the work order was submitted.
I cannot find my notes at the moment but I am pretty sure it is this setting. Not very intuitive by the name I would expect to see your system set to 1.
SUPPRESSACTCHECK
SYSTEM
0
Flag to suppress checking of work order actual dates
Kevin
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of shannon sutton
Sent: Wednesday, November 07, 2012 11:19 AM
To: MAXIMO@yahoogroups.com<mailto:MAXIMO@yahoogroups.com>
Subject: Re: [MAXIMO List] Set ActStart/Actfinish from Labtrans
7.5
Shannon Dale SuttonMobile: 318-334-8002
________________________________
From: Ian Wright <ian.wright@gdfsuezep.co.uk<mailto:ian.wright%40gdfsuezep.co.uk>>
To: "MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>" <MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>>
Sent: Wednesday, November 7, 2012 11:16 AM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
What version
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>] On Behalf Of shannon sutton
Sent: 07 November 2012 14:44
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Subject: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Does anyone have any good ideas or ways to populate the Actual Start based on earliest Labor entry and Actual finish based on Latest Labor entry for a work order?
Client before used trigger to set the values but Time Zone issues are causing this not to work. Could escalations be used, but i am not sure with an escalation how i would combine startdate and starttime in labtrans table..
Shannon Dale Sutton
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************
Shannon
The way it was explained to by IBM support (and our testing confirmed) the maxvars setting controls how the system validates the actual start and actual finish dates against the labor transactions. If a labor transaction is entered with a start date/time prior to the actual start/time date the actual start date/time is changed to match the labor entry. If there is a labor transaction the finishes after the actual finish date/time the actual finish date is modified.
The issue we encountered is as follows. A work order is submitted at 2 PM on OCT 2nd. The worker is assigned and the work order placed in progress. He starts work at 3PM that day. His labor is entered the next day by a clerk. The date is modified to OCT 2nd but the default time 8:30 AM is not changed. With the validation turned on the actual start would be modified to 8:30 AM OCT 2nd. Several hours before the work order was created.
Kevin
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of shannon sutton
Sent: Wednesday, November 07, 2012 3:33 PM
To: MAXIMO@yahoogroups.com
Subject: Re: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Appreciate the feedback.. This is not really along the lines of what we are trying to accomplish..
There is a requirement for the Actual Start of the Work order to be the same date and time of the earliest labor transaction and the actual finish be set to the latest date and time of the labor transaction..
In 5.2 this was accomplished by using a DB trigger, but using a DB trigger is ignoring the Maximo MBO's and since the server is located in a different time zone than the user it is causing issues when the work order is being updated..
SELECT @v_first_labtrans_start = MIN(CAST(CAST(DBO.v_LABTRANS.STARTDATE AS DATE)AS DATETIME) + CAST(DBO.v_LABTRANS.STARTTIME AS TIME)) , @v_last_labtrans_finish = MAX(CAST(CAST(DBO.v_LABTRANS.FINISHDATE AS DATE) AS DATETIME) + CAST(DBO.v_LABTRANS.finishtime AS TIME)) FROM DBO.v_LABTRANS WHERE v_LABTRANS.siteid=@v_siteid<mailto:v_LABTRANS.siteid=@v_siteid> and v_LABTRANS.REFWO = @v_refwo GROUP BY v_LABTRANS.REFWO UPDATE dbo.workorder SET actstart = dateadd(hh,-2,@v_new_start), actfinish = dateadd(hh,-2,@v_new_finish) from dbo.workorder WHERE workorder.siteid = @v_siteid and workorder.wonum = @v_refwo
________________________________
From: Kevin Egolf <kegolf@techopsolutions.net<mailto:kegolf%40techopsolutions.net>>
To: "MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>" <MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>>
Sent: Wednesday, November 7, 2012 12:02 PM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Sharon
There was a maxvars setting that controls that in version 6 but I do not remember what it was. We turned it off since we were having issues with people reporting labor the next day and not updating the time. We ended up with actual start dates prior to the time the work order was submitted.
I cannot find my notes at the moment but I am pretty sure it is this setting. Not very intuitive by the name I would expect to see your system set to 1.
SUPPRESSACTCHECK
SYSTEM
0
Flag to suppress checking of work order actual dates
Kevin
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>] On Behalf Of shannon sutton
Sent: Wednesday, November 07, 2012 11:19 AM
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com><mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>>
Subject: Re: [MAXIMO List] Set ActStart/Actfinish from Labtrans
7.5
Shannon Dale SuttonMobile: 318-334-8002
________________________________
From: Ian Wright <ian.wright@gdfsuezep.co.uk<mailto:ian.wright%40gdfsuezep.co.uk><mailto:ian.wright%40gdfsuezep.co.uk>>
To: "MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com><mailto:MAXIMO%40yahoogroups.com>" <MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com><mailto:MAXIMO%40yahoogroups.com>>
Sent: Wednesday, November 7, 2012 11:16 AM
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
What version
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com><mailto:MAXIMO%40yahoogroups.com> [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com><mailto:MAXIMO%40yahoogroups.com>] On Behalf Of shannon sutton
Sent: 07 November 2012 14:44
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com><mailto:MAXIMO%40yahoogroups.com>
Subject: [MAXIMO List] Set ActStart/Actfinish from Labtrans
Does anyone have any good ideas or ways to populate the Actual Start based on earliest Labor entry and Actual finish based on Latest Labor entry for a work order?
Client before used trigger to set the values but Time Zone issues are causing this not to work. Could escalations be used, but i am not sure with an escalation how i would combine startdate and starttime in labtrans table..
Shannon Dale Sutton
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************
The Actual Start on the front of the work order automatically gets populated when the work order’s status changes to INPRG. At one client, I just have a simple escalation to change the status to INPRG when there’s a reference in LABTRANS, i.e. wonum in (select refwo from labtrans).
(Although that’s maybe not the most efficient SQL – I’m just going by memory here.)
Likewise, the Actual Finish gets automatically populated when the status changes to COMP, so …
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of Ian Wright
Sent: November-07-12 9:13 AM
To: MAXIMO@yahoogroups.com
Subject: RE: [MAXIMO List] Set ActStart/Actfinish from Labtrans
There is an option in org app --> options --> work order --> other org options
To set “actual start date “ on change status initiate or change status complete
But I don’t think this is what you want
Also in org app --> options --> labor options there is a future tolerance in hours which might be causing you issues with the time difference I had this problem when I was working with BP in Houston as we worked across many time zones
GDF SUEZ E&P UK Ltd (Company Number 3386464), registered in England and Wales with a registered office address at: 40 Holborn Viaduct, London, EC1N 2PB.
**************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**************************************************************************************************************