Merged PR 11840: Added MFS logic to ensure notes data cannot be removed.
Added MFS logic to ensure notes data cannot be removed. Related work items: #231781
This commit is contained in:
parent
15495aa7ef
commit
6fd0d30717
File diff suppressed because it is too large
Load Diff
@ -372,8 +372,11 @@ Write:
|
||||
end
|
||||
end
|
||||
|
||||
IOOptions = Get_Property(@Window, 'IOOPTIONS')
|
||||
IOOptions<6> = True$
|
||||
Set_Property(@Window, 'IOOPTIONS', IOOptions)
|
||||
Reactor_Log_Events(@Window, 'WRITE')
|
||||
|
||||
Reactor_Log_Events(@Window, 'READ')
|
||||
Result = 1
|
||||
|
||||
RETURN
|
||||
@ -676,7 +679,7 @@ TechSign:
|
||||
|
||||
If Valid then
|
||||
SuccessfulSign = Reactor_Log_Services('SignReactorLog', ReactorLogNo, @USER4)
|
||||
If SuccessfulSign EQ 0 then
|
||||
If Not(SuccessfulSign) then
|
||||
Error_Services('DisplayError')
|
||||
ActiveRlNicaOrderIds = Nica_Orders_Services('GetActiveOrders', 'REACTOR_LOG', ReactorLogNo)
|
||||
ActiveChecklist = (ActiveRlNicaOrderIds NE '')
|
||||
@ -1399,7 +1402,7 @@ PostItems:
|
||||
RLNo = Vals[1,@RM]
|
||||
PostBy = Vals[COL2()+1,@RM]
|
||||
PostDTM = Vals[COL2()+1,@RM]
|
||||
|
||||
Reactor_Log_Events(@WINDOW, 'WRITE')
|
||||
CurrRLRec = Get_Property (@Window, "ATRECORD")
|
||||
Database_Services('WriteDataRow', 'REACTOR_LOG', RLNo, CurrRLRec, 1, 0, 1)
|
||||
Set_Property(@Window, 'SAVEWARN', 0)
|
||||
@ -1658,5 +1661,3 @@ ColorRemRiTable:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ $Insert WO_MAT_QA_EQUATES
|
||||
Equ WOCust$ to 2
|
||||
Equ Comma$ to ','
|
||||
|
||||
Declare function Error_Services, Database_Services, Logging_Services, Environment_Services, Nica_Orders_Services
|
||||
Declare function Error_Services, Database_Services, Logging_Services, Environment_Services, Nica_Orders_Services, SRP_Sort_Array
|
||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Set_Status, Reactor_Log_Services, Rds_Services
|
||||
Declare subroutine Nica_Orders_Services
|
||||
|
||||
@ -142,8 +142,24 @@ READONLY_RECORD:
|
||||
return
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
ActionFlow = ACTION_CONTINUE$
|
||||
//Ensures notes are not deleted
|
||||
OrigNotes = OrigRecord<REACTOR_LOG_NOTES$>
|
||||
UpdatedNotes = Record<REACTOR_LOG_NOTES$>
|
||||
for each OrigNote in OrigNotes using @VM setting NotePos
|
||||
If OrigNote NE UpdatedNotes<1, NotePos> then
|
||||
Error_Services('Add', 'Notes content error.')
|
||||
OrigFileError = 104:': Notes content error.'
|
||||
Status = 0
|
||||
Record = ''
|
||||
ActionFlow = ACTION_STOP$
|
||||
end
|
||||
until ActionFlow EQ ACTION_STOP$
|
||||
Next UpdatedNote
|
||||
|
||||
If ActionFlow NE ACTION_STOP$ then
|
||||
OrigROTRFlag = OrigRecord<REACTOR_LOG_ROTR$>
|
||||
UpdatedROTRFlag = OrigRecord<REACTOR_LOG_ROTR$>
|
||||
NewROTRFlag = Record<REACTOR_LOG_ROTR$>
|
||||
|
||||
ReactNo = Record<REACTOR_LOG_REACTOR$>
|
||||
@ -200,7 +216,7 @@ WRITE_RECORD_PRE:
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
return
|
||||
|
||||
WRITE_RECORD:
|
||||
@ -377,3 +393,4 @@ Restore_System_Variables:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ EQU COL$ITEM_ID TO 7
|
||||
EQU COL$ITEM_RI_NO TO 8
|
||||
|
||||
Declare subroutine Post_Event, Database_Services
|
||||
Declare function Datetime, SRP_String
|
||||
Declare function Datetime, SRP_String, Database_Services
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
@ -79,9 +79,9 @@ Return EventFlow or 1
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
GoSub SetupOLEControls
|
||||
* IOOptions = Get_Property(@Window, 'IOOPTIONS')
|
||||
* IOOptions<6> = True$ ; // Don't clear on write
|
||||
* Set_Property(@Window, 'IOOPTIONS', IOOptions)
|
||||
IOOptions = Get_Property(@Window, 'IOOPTIONS')
|
||||
IOOptions<6> = True$ ; // Don't clear on write
|
||||
Set_Property(@Window, 'IOOPTIONS', IOOptions)
|
||||
|
||||
end event
|
||||
|
||||
@ -99,6 +99,10 @@ Event WINDOW.WRITE()
|
||||
QBF = Get_Property(@Window, "QBFSTATUS")
|
||||
If QBF EQ False$ then Set_Property(@Window:'.OLE_EDT_NOTES', 'OLE.ARRAY', '')
|
||||
|
||||
IOOptions = Get_Property(@Window, 'IOOPTIONS')
|
||||
IOOptions<6> = True$
|
||||
Set_Property(@Window, 'IOOPTIONS', IOOptions)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
@ -220,7 +224,8 @@ return
|
||||
|
||||
FillForm:
|
||||
|
||||
AtRecord = Get_Property(@Window, 'ATRECORD')
|
||||
RLNo = Get_Property(@Window:'.REACTOR_LOG_NO', 'TEXT')
|
||||
AtRecord = Database_Services('ReadDataRow', 'REACTOR_LOG', RLNo)
|
||||
Notes = AtRecord<REACTOR_LOG_NOTES$>
|
||||
// OI 10 seems to messing up delimiters...
|
||||
Convert @TM to @VM in Notes
|
||||
@ -270,8 +275,9 @@ UpdateNotes:
|
||||
AtRecord<REACTOR_LOG_NOTES$> = Notes
|
||||
AtRecord<REACTOR_LOG_NOTES_DTMS$> = IConv(NotesDTMs, 'DT')
|
||||
AtRecord<REACTOR_LOG_NOTES_USERS$> = Get_Property(@Window, '@NOTES_USERNAMES')
|
||||
Set_Property(@Window, 'ATRECORD', AtRecord)
|
||||
@Record = AtRecord
|
||||
Database_Services('WriteDataRow', 'REACTOR_LOG', @ID, AtRecord, True$)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user