We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.
For more information around feature requests in the Cireson Community click here.
Implement Auto Save when a comment is added to an IR/SR for Cireson SSP and Analyst Portal
We are running a lot into the issue that a user types in a comment to an incident and hits the Add" button. this leads to the comment being added to the list below and the user closes the page and the comment is lost. If you could add a "Add and Save" button or just auto save on clicking "Add" or even a 'hard return' to commit the comment similar to how instant messaging systems function. This would be great. |
Comments
/* Comment Tasks */
app.custom.formTasks.add('ServiceRequest', "Comment", function (formObj, viewModel) {
console.log(formObj);
//use require js to load the template first
require(["text!/CustomSpace/templates/SRComment.html"], function (template) {
//make a jQuery obj
cont = $(template);
//create a view model to handle the UX
var _vmWindow = new kendo.observable({
comment: "",
isPrivate: false,
okEnabled: false,
charactersRemaining: "4000",
textCounter: function () {
var maximumLength = 4000;
var val = this.comment.length;
(val > maximumLength) ? this.comment.substring(0, maximumLength) : this.set("charactersRemaining", maximumLength - val);
(val > 0) ? this.set("okEnabled", true) : this.set("okEnabled", false);
},
saveStatus: function () {
//set action log
var newActionLog = {
EnteredBy: session.user.Name,
Title: localization.Analyst + " " + localization.Comment,
IsPrivate: this.get("isPrivate"),
EnteredDate: new Date().toISOString().split(".")[0],
LastModified: new Date().toISOString().split(".")[0],
Description: this.get("comment"),
Image: app.config.iconPath + app.config.icons["comment"],
ActionType: "AnalystComment"
}
//beta method
actionLogModel.push(newActionLog);
},
okClick: function () {
this.saveStatus();
save();
customWindow.close();
},
cancelClick: function () {
customWindow.close();
}
});
//create the kendo window
customWindow = cont.kendoWindow({
title: "Enter Comment",
resizable: false,
modal: true,
viewable: false,
width: 500,
height: 350,
close: function () {
},
activate: function () {
//on window activate bind the view model to the loaded template content
kendo.bind(cont, _vmWindow);
}
}).data("kendoWindow");
//now open the window
customWindow.open().center();
});
});
app.custom.formTasks.add('Incident', "Comment", function (formObj, viewModel) {
console.log(formObj);
//use require js to load the template first
require(["text!/CustomSpace/templates/SRComment.html"], function (template) {
//make a jQuery obj
cont = $(template);
//create a view model to handle the UX
var _vmWindow = new kendo.observable({
comment: "",
isPrivate: false,
okEnabled: false,
charactersRemaining: "4000",
textCounter: function () {
var maximumLength = 4000;
var val = this.comment.length;
(val > maximumLength) ? this.comment.substring(0, maximumLength) : this.set("charactersRemaining", maximumLength - val);
(val > 0) ? this.set("okEnabled", true) : this.set("okEnabled", false);
},
saveStatus: function () {
//set action log
var newActionLog = {
EnteredBy: session.user.Name,
Title: localization.Analyst + " " + localization.Comment,
IsPrivate: this.get("isPrivate"),
EnteredDate: new Date().toISOString().split(".")[0],
LastModified: new Date().toISOString().split(".")[0],
Description: this.get("comment"),
Image: app.config.iconPath + app.config.icons["comment"],
ActionType: "AnalystComment"
}
//beta method
actionLogModel.push(newActionLog);
},
okClick: function () {
this.saveStatus();
save();
customWindow.close();
},
cancelClick: function () {
customWindow.close();
}
});
//create the kendo window
customWindow = cont.kendoWindow({
title: "Enter Comment",
resizable: false,
modal: true,
viewable: false,
width: 500,
height: 350,
close: function () {
},
activate: function () {
//on window activate bind the view model to the loaded template content
kendo.bind(cont, _vmWindow);
}
}).data("kendoWindow");
//now open the window
customWindow.open().center();
});
});Next, within the Incident.js and ServiceRequest.js file, you can remove the comment section of the template.
Do you mind sharing the SRComment.html file
Thanks
would be great to be able to save a long (Multi page) forms and come back to them later on.
just a thought.
Cheers,
Adrian
https://community.cireson.com/discussion/1883/custom-apply-save-form-when-comment-is-added
Scroll down for the latest version!
Any update on this one?
Bump
Also, this would be probably better if it was called "Implement Auto save when a comment is added to a work item" rather then "SR/IR" :)
Already voted for this feature, hopefully it'll soon make it out of backlog, since it's been there for almost a year :)