In my environment "TDB Security Member" custom field has been designed to capture the ID of the "current active user" whenever a user accesses an issue. So now, although the user is not actively making a change, this field is an open read field that is immediately capturing user ID information and updating. Just wondering if there a way to re-architect a solution where the TDB Security Member field does not report a new value every time any user accesses an issue?
here is the attached TDB Script for "issue security approval"
if(TDBSecurityApprover==""){
TDBSecurityMember = currentUser();
}
if(!userInGroup("TDB Security Elevated Approvers", currentUser()))
{
// lfDialogMessage(currentUser(),"ERROR") ;
lfDisable("TDBSecurityMember");
}
switch(currentUser()){
case "bd1959"://Brandon
lfDisable("TDBMemberDecisionBrandon");
// lfDialogMessage("Security Approved by Brandon", "ERROR") ;
break;
case "ab1484"://Seth
lfDisable("TDBMemberDecisionSeth");
// lfDialogMessage("Security Approved by Seth", "ERROR") ;
break;
}
//lfWatch("TDB Security Member", {"TDB Security Member", "TDB_security_approver"}, " SecurityApproverWatch.sil", {"change"});
another script attached is
"SecurityDecisionChange"
string securityMember = TDBSecurityMember;
string c_user = currentUser();
JFieldChange[] changes = getFieldChanges(key, "TDB Security Decision");
// lfDialogMessage(changes, "ERROR");
JFieldChange latestChange = changes[0];
date newest = latestChange.changeDate;
for (JFieldChange change in changes) {
if (change.changeDate > newest) {
latestChange = change;
}
}
//lfDialogMessage(latestChange, "ERROR");
JFieldChange[] securityMember_changes = getFieldChanges(key, "TDB Security Member");
// lfDialogMessage(securityMember_changes, "ERROR");
JFieldChange latestSMChange = securityMember_changes[0];
date newestSM = latestSMChange.changeDate;
for (JFieldChange change in securityMember_changes) {
if (change.changeDate > newestSM) {
latestSMChange = change;
}
}
//lfDialogMessage(latestSMChange, "ERROR");
JUser lastSM = getUserByFullName(latestSMChange[4]);
lfDialogMessage(lastSM[0], "ERROR");
if(TDBSecurityDecision!=latestChange[4]||TDBSecurityMember!=lastSM[0]){
//lfDialogMessage("Security Decission Changed", "ERROR");
if(userInGroup("TDB Security Elevated Approvers", currentUser())&¤tUser()!=securityMember){
c_user=securityMember;
}else{
TDBSecurityMember=c_user;
}
switch(c_user)
{
case "bd1959"://Brandon bd1959
TDBSecurityApprover=c_user;
// lfDialogMessage("bd1959", "ERROR");
lfDisable("TDBMemberDecisionBrandon");
break;
case "ab1484"://Seth ab1484
TDBSecurityApprover=c_user;
// lfDialogMessage("ab1484", "ERROR");
lfDisable("TDBMemberDecisionSeth");
break;
default:
TDBSecurityApprover=c_user;
}
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.