BUG 8457 Problems reassigning cases to other users under HOME>Reassign SOLVED
- We found some loose details in the reassignment. - It was added a note for the correct use of the reassignment and also a warning before continuing doing reassignment.
This commit is contained in:
@@ -485,58 +485,47 @@ Ext.onReady ( function() {
|
|||||||
//storeReassignCases.reload();
|
//storeReassignCases.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var ExecReassign = function () {
|
||||||
|
newPopUp.hide();
|
||||||
|
var rs = storeReassignCases.getModifiedRecords();
|
||||||
|
|
||||||
var btnExecReassignSelected = new Ext.Button ({
|
var sv = [];
|
||||||
text: _('ID_REASSIGN'),
|
for(var i = 0; i <= rs.length-1; i++){
|
||||||
// text: 'Reassign',
|
sv[i]= rs[i].data;
|
||||||
// text: TRANSLATIONS.LABEL_SELECT_ALL,
|
|
||||||
handler: function(){
|
|
||||||
newPopUp.hide();
|
|
||||||
var rs = storeReassignCases.getModifiedRecords();
|
|
||||||
var sv = [];
|
|
||||||
for(var i = 0; i <= rs.length-1; i++){
|
|
||||||
//sv[i]= rs[i].data['name'];
|
|
||||||
sv[i]= rs[i].data;
|
|
||||||
}
|
|
||||||
var gridData = storeReassignCases.getModifiedRecords();
|
|
||||||
Ext.MessageBox.show({ msg: _('ID_PROCESSING'), wait:true,waitConfig: {interval:200} });
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url: 'proxySaveReassignCasesList',
|
|
||||||
success: function(response) {
|
|
||||||
Ext.MessageBox.hide();
|
|
||||||
storeCases.reload();
|
|
||||||
var ajaxServerResponse = Ext.util.JSON.decode(response.responseText);
|
|
||||||
var count;
|
|
||||||
var message = '';
|
|
||||||
|
|
||||||
for (count in ajaxServerResponse) {
|
|
||||||
if ( ajaxServerResponse[count]['TAS_TITLE'] != undefined ){
|
|
||||||
message = message + _('ID_CASE') + ": " + ajaxServerResponse[count]['APP_TITLE'] + " - " + _('ID_REASSIGNED_TO') + ": " + ajaxServerResponse[count]['APP_REASSIGN_USER'] + "<br>" ;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ajaxServerResponse['TOTAL']!=undefined&&ajaxServerResponse['TOTAL']!=-1){
|
|
||||||
message = message + "<br> " + _('ID_TOTAL_CASES_REASSIGNED') + ": " + ajaxServerResponse['TOTAL'];
|
|
||||||
} else {
|
|
||||||
message = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
if (message!=""){
|
|
||||||
Ext.MessageBox.alert( _('ID_STATUS_REASSIGNMENT'), message, '' );
|
|
||||||
}
|
|
||||||
},
|
|
||||||
params: { APP_UIDS:ids, data:Ext.util.JSON.encode(sv), selected:true }
|
|
||||||
});
|
|
||||||
|
|
||||||
/*storeReassignCases.setBaseParam('selected', true);
|
|
||||||
var result = storeReassignCases.save();
|
|
||||||
//storeCases.load({params:{process: filterProcess, start : 0 , limit : pageSize}});
|
|
||||||
newPopUp.hide();
|
|
||||||
storeCases.reload();
|
|
||||||
//storeReassignCases.reload();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
});
|
var gridData = storeReassignCases.getModifiedRecords();
|
||||||
|
Ext.MessageBox.show({ msg: _('ID_PROCESSING'), wait:true,waitConfig: {interval:200} });
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: 'proxySaveReassignCasesList',
|
||||||
|
success: function(response) {
|
||||||
|
Ext.MessageBox.hide();
|
||||||
|
storeCases.reload();
|
||||||
|
var ajaxServerResponse = Ext.util.JSON.decode(response.responseText);
|
||||||
|
var count;
|
||||||
|
var message = '';
|
||||||
|
|
||||||
|
for (count in ajaxServerResponse) {
|
||||||
|
if ( ajaxServerResponse[count]['TAS_TITLE'] != undefined ){
|
||||||
|
message = message + _('ID_CASE') + ": " + ajaxServerResponse[count]['APP_TITLE'] + " - " + _('ID_REASSIGNED_TO') + ": " + ajaxServerResponse[count]['APP_REASSIGN_USER'] + "<br>" ;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ajaxServerResponse['TOTAL']!=undefined&&ajaxServerResponse['TOTAL']!=-1){
|
||||||
|
message = message + "<br> " + _('ID_TOTAL_CASES_REASSIGNED') + ": " + ajaxServerResponse['TOTAL'];
|
||||||
|
} else {
|
||||||
|
message = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
if (message!=""){
|
||||||
|
Ext.MessageBox.alert( _('ID_STATUS_REASSIGNMENT'), message, '' );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
params: { APP_UIDS:ids, data:Ext.util.JSON.encode(sv), selected:true }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create HttpProxy instance, all CRUD requests will be directed to single proxy url.
|
// Create HttpProxy instance, all CRUD requests will be directed to single proxy url.
|
||||||
var proxyCasesList = new Ext.data.HttpProxy({
|
var proxyCasesList = new Ext.data.HttpProxy({
|
||||||
@@ -791,7 +780,7 @@ Ext.onReady ( function() {
|
|||||||
// text: 'Reassign',
|
// text: 'Reassign',
|
||||||
// text: TRANSLATIONS.LABEL_UNSELECT_ALL,
|
// text: TRANSLATIONS.LABEL_UNSELECT_ALL,
|
||||||
handler: function(){
|
handler: function(){
|
||||||
reassign();
|
reassign();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1532,6 +1521,7 @@ Ext.onReady ( function() {
|
|||||||
listeners: {
|
listeners: {
|
||||||
rowdblclick: openCase,
|
rowdblclick: openCase,
|
||||||
render: function(){
|
render: function(){
|
||||||
|
|
||||||
//this.loadMask = new Ext.LoadMask(this.body, {msg:TRANSLATIONS.LABEL_GRID_LOADING});
|
//this.loadMask = new Ext.LoadMask(this.body, {msg:TRANSLATIONS.LABEL_GRID_LOADING});
|
||||||
//this.ownerCt.doLayout();
|
//this.ownerCt.doLayout();
|
||||||
}
|
}
|
||||||
@@ -1580,12 +1570,27 @@ Ext.onReady ( function() {
|
|||||||
region: 'center',
|
region: 'center',
|
||||||
store: storeReassignCases,
|
store: storeReassignCases,
|
||||||
cm: reassignCm,
|
cm: reassignCm,
|
||||||
|
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
viewConfig: {
|
viewConfig: {
|
||||||
forceFit:true
|
forceFit:true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var btnExecReassignSelected = new Ext.Button ({
|
||||||
|
text: _('ID_REASSIGN'),
|
||||||
|
handler: function(){
|
||||||
|
var rs = storeReassignCases.getModifiedRecords();
|
||||||
|
|
||||||
|
if (rs.length < storeReassignCases.totalLength) {
|
||||||
|
Ext.Msg.confirm( _('ID_CONFIRM'), _('ID_CONFIRM_TO_REASSIGN'), function (btn, text) {
|
||||||
|
if ( btn == 'yes' ) {
|
||||||
|
ExecReassign();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var gridForm = new Ext.FormPanel({
|
var gridForm = new Ext.FormPanel({
|
||||||
id: 'reassign-form',
|
id: 'reassign-form',
|
||||||
@@ -1594,6 +1599,8 @@ var gridForm = new Ext.FormPanel({
|
|||||||
//title: 'Company data',
|
//title: 'Company data',
|
||||||
bodyStyle:'padding:5px',
|
bodyStyle:'padding:5px',
|
||||||
width: 750,
|
width: 750,
|
||||||
|
|
||||||
|
|
||||||
layout: 'column', // Specifies that the items will now be arranged in columns
|
layout: 'column', // Specifies that the items will now be arranged in columns
|
||||||
items: [{
|
items: [{
|
||||||
id : 'tasksGrid',
|
id : 'tasksGrid',
|
||||||
@@ -1617,10 +1624,12 @@ var gridForm = new Ext.FormPanel({
|
|||||||
title : _('ID_CASES_TO_REASSIGN_TASK_LIST'),
|
title : _('ID_CASES_TO_REASSIGN_TASK_LIST'),
|
||||||
border : true,
|
border : true,
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
click: function() {
|
|
||||||
|
click: function() {
|
||||||
rows = this.getSelectionModel().getSelections();
|
rows = this.getSelectionModel().getSelections();
|
||||||
var application = '';
|
var application = '';
|
||||||
|
comboUsersToReassign.disable();
|
||||||
if( rows.length > 0 ) {
|
if( rows.length > 0 ) {
|
||||||
comboUsersToReassign.enable();
|
comboUsersToReassign.enable();
|
||||||
var ids = '';
|
var ids = '';
|
||||||
@@ -1629,13 +1638,13 @@ var gridForm = new Ext.FormPanel({
|
|||||||
application = rows[i].get('APP_UID');
|
application = rows[i].get('APP_UID');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
comboUsersToReassign.disable();
|
|
||||||
}
|
}
|
||||||
comboUsersToReassign.clearValue();
|
comboUsersToReassign.clearValue();
|
||||||
storeUsersToReassign.removeAll();
|
storeUsersToReassign.removeAll();
|
||||||
storeUsersToReassign.setBaseParam('application',application);
|
storeUsersToReassign.setBaseParam('application',application);
|
||||||
|
|
||||||
//storeUsersToReassign.load();
|
storeUsersToReassign.load();
|
||||||
//alert(record.USERS);
|
//alert(record.USERS);
|
||||||
} // Allow rows to be rendered.
|
} // Allow rows to be rendered.
|
||||||
|
|
||||||
@@ -1646,16 +1655,27 @@ var gridForm = new Ext.FormPanel({
|
|||||||
xtype: 'fieldset',
|
xtype: 'fieldset',
|
||||||
labelWidth: 50,
|
labelWidth: 50,
|
||||||
title: _('ID_USER_LIST'),
|
title: _('ID_USER_LIST'),
|
||||||
defaults: {width: 170, border:false}, // Default config options for child items
|
defaults: {width: 200, border:false}, // Default config options for child items
|
||||||
defaultType: 'textfield',
|
defaultType: 'textfield',
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
bodyStyle: Ext.isIE ? 'text-align: right;padding:0 0 5px 15px;' : 'text-align: right; padding:10px 15px;',
|
bodyStyle: Ext.isIE ? 'text-align: left;padding:0 0 5px 15px;' : 'text-align: left; padding:10px 5px;',
|
||||||
border: false,
|
border: false,
|
||||||
style: {
|
//style: {
|
||||||
"margin-left": "10px", // when you add custom margin in IE 6...
|
// "margin-left": "10px", // when you add custom margin in IE 6...
|
||||||
"margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else
|
// "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else
|
||||||
},
|
//},
|
||||||
items: comboUsersToReassign
|
items:
|
||||||
|
[
|
||||||
|
comboUsersToReassign,
|
||||||
|
{
|
||||||
|
xtype: 'fieldset',
|
||||||
|
border : true,
|
||||||
|
defaultType: 'textfield',
|
||||||
|
title: _('ID_INSTRUCTIONS'),
|
||||||
|
autoHeight:true,
|
||||||
|
html: _('ID_INSTRUCTIONS_TEXT')
|
||||||
|
}
|
||||||
|
]
|
||||||
}]
|
}]
|
||||||
//renderTo: bd
|
//renderTo: bd
|
||||||
});
|
});
|
||||||
@@ -1781,9 +1801,11 @@ var gridForm = new Ext.FormPanel({
|
|||||||
|
|
||||||
|
|
||||||
function reassign(){
|
function reassign(){
|
||||||
|
storeReassignCases.removeAll();
|
||||||
var rows = grid.getSelectionModel().getSelections();
|
var rows = grid.getSelectionModel().getSelections();
|
||||||
storeReassignCases.rejectChanges();
|
storeReassignCases.rejectChanges();
|
||||||
var tasks = [];
|
var tasks = [];
|
||||||
|
var sw = 0;
|
||||||
if( rows.length > 0 ) {
|
if( rows.length > 0 ) {
|
||||||
ids = '';
|
ids = '';
|
||||||
for(i=0; i<rows.length; i++) {
|
for(i=0; i<rows.length; i++) {
|
||||||
@@ -1794,6 +1816,7 @@ function reassign(){
|
|||||||
}
|
}
|
||||||
storeReassignCases.setBaseParam( 'APP_UIDS', ids);
|
storeReassignCases.setBaseParam( 'APP_UIDS', ids);
|
||||||
storeReassignCases.load();
|
storeReassignCases.load();
|
||||||
|
|
||||||
newPopUp.show();
|
newPopUp.show();
|
||||||
comboUsersToReassign.disable();
|
comboUsersToReassign.disable();
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
var storeUsersToReassign = new Ext.data.Store({
|
var storeUsersToReassign = new Ext.data.Store({
|
||||||
remoteSort: false,
|
remoteSort: false,
|
||||||
|
autoLoad:true,
|
||||||
proxy : proxyUsersToReassignList,
|
proxy : proxyUsersToReassignList,
|
||||||
reader: readerUsersToReassignList,
|
reader: readerUsersToReassignList,
|
||||||
writer: writerUsersToReassignList, // <-- plug a DataWriter into the store just as you would a Reader
|
writer: writerUsersToReassignList, // <-- plug a DataWriter into the store just as you would a Reader
|
||||||
@@ -63,11 +64,10 @@
|
|||||||
valueField : 'userId',
|
valueField : 'userId',
|
||||||
displayField : 'userFullname',
|
displayField : 'userFullname',
|
||||||
selectOnFocus : true,
|
selectOnFocus : true,
|
||||||
typeAhead : true,
|
typeAhead : false,
|
||||||
autocomplete : true,
|
autocomplete : true,
|
||||||
hideTrigger : Boolean,
|
hideTrigger : Boolean,
|
||||||
alignTo : 'right',
|
alignTo : 'right',
|
||||||
selectOnFocus:true,
|
|
||||||
mode : 'remote',
|
mode : 'remote',
|
||||||
triggerAction : 'all',
|
triggerAction : 'all',
|
||||||
emptyText : _('ID_ENTER_SEARCH_TERM'),
|
emptyText : _('ID_ENTER_SEARCH_TERM'),
|
||||||
|
|||||||
Reference in New Issue
Block a user