Decision date not set when approve/rejecting RA in the Portal "The new way"
Best Answer
-
Billy_Wilson Member Ninja IT Monkey ✭✭✭✭This is a known bug and we are working on a release to fix it but in the meantime here is a workaround:
Edit the file C:/inetpub/CiresonPortal/Scripts/forms/header/approval/controller.js (make a backup somewhere first).
Find the following section of code around line 31:
var reviewer = _.filter(vm.viewModel.Reviewer, function(item) {
return item.User.BaseId == session.user.Id;
});reviewer[0].Decision.Id = vm.view.approvalModel.decisionEnumId;
reviewer[0].Comments = reviewer[0].Comments + " " + vm.view.approvalModel.comments;
vm.view.approvalModel.save();
Replace it with this code:
var reviewer = _.filter(vm.viewModel.Reviewer, function(item) {
if (!_.isUndefined(item.User) && !_.isUndefined(item.User.BaseId)) {
return item.User.BaseId == session.user.Id;
}
});reviewer[0].Decision.Id = vm.view.approvalModel.decisionEnumId;
reviewer[0].VotedBy = {};
reviewer[0].VotedBy.BaseId = session.user.Id;
var decisionDate = new Date();
reviewer[0].DecisionDate = decisionDate.toISOString();
if (reviewer[0].Comments === null) {
reviewer[0].Comments = vm.view.approvalModel.comments;
}
else {
reviewer[0].Comments = reviewer[0].Comments + " " + vm.view.approvalModel.comments;
}
vm.view.approvalModel.save();
You may need to clear your browser cache so it will load. This fixed it in my lab. Let me know how it works for you.6
Answers
I am getting the same thing. Checking with Development on this....
Edit the file C:/inetpub/CiresonPortal/Scripts/forms/header/approval/controller.js (make a backup somewhere first).
Find the following section of code around line 31:
var reviewer = _.filter(vm.viewModel.Reviewer, function(item) {
return item.User.BaseId == session.user.Id;
});
reviewer[0].Comments = reviewer[0].Comments + " " + vm.view.approvalModel.comments;
vm.view.approvalModel.save();
Replace it with this code:
var reviewer = _.filter(vm.viewModel.Reviewer, function(item) {
if (!_.isUndefined(item.User) && !_.isUndefined(item.User.BaseId)) {
return item.User.BaseId == session.user.Id;
}
});
reviewer[0].VotedBy = {};
reviewer[0].VotedBy.BaseId = session.user.Id;
var decisionDate = new Date();
reviewer[0].DecisionDate = decisionDate.toISOString();
if (reviewer[0].Comments === null) {
reviewer[0].Comments = vm.view.approvalModel.comments;
}
else {
reviewer[0].Comments = reviewer[0].Comments + " " + vm.view.approvalModel.comments;
}
vm.view.approvalModel.save();
You may need to clear your browser cache so it will load. This fixed it in my lab. Let me know how it works for you.