- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2016 10:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 02:56 AM
Okay perfect,
Here is a screenshot that shows the parameters of the UI action, Please do the same
Do not forget to put the action name, check client to true, and put the function name on Onclick()
HEre is the script :
function reopenIncidentTest(){
if (g_form.getValue('comments') == '') {
//Remove any existing field message, set comments mandatory, and show a new field message
try {
g_form.hideFieldMsg('comments');
} catch(e) {}
g_form.setMandatory('comments', true);
g_form.showFieldMsg('comments','Reason is required when reopening an incident','error');
return false; //Abort submission
}
//Call the UI Action and skip the 'onclick' function
gsftSubmit(null, g_form.getFormElement(), 'incident_reopen_test'); //MUST call the 'Action name' set in this UI Action
}
//Code that runs without 'onclick'
//Ensure call to server-side function with no browser errors
if (typeof window == 'undefined')
serverReject();
function serverReject(){
current.state = 2;
current.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 03:35 AM
You don't have to feel shy, it is not that simple I know that,
Dectivate your previous ui action, in my instance is not not creating a new incident, it is changing only the state to active again...
Are you sure you do not have another UI action or script that is creating a new incident ??
To make sure, copy the incident number, set it to resolved, click the button again and go back to that incident and check it state please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 03:43 AM
I left out the action.setRedirect intentionnaly so once it is reopen, it brings you back to the active list of incident in which you can see if the incident has been reopened correctly.
To see that you can sort out by the updated column and the last incident reopened should be on the top on the list.
If you want to stay on the same form, you can add action.setRedirectURL(current) after the current.update() row, then once the state is updated, it will still stay within the same form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 03:59 AM
I have tried this also then also it is opening new incident..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 04:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 05:04 AM
Okay I see,
switch the view to the default view (click on the button next the arrow before incident number on the header.
Also Have you got at least the ITIL role or Admin role to be able to resolve and incident ?
There may be have a rule that prevents an end user to resolve or reopen an incident.