Skip to content

Commit

Permalink
- BZ-1166663: fixing completing tasks above 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
salaboy committed Dec 19, 2014
1 parent 2103437 commit c3f0372
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
Expand Up @@ -198,10 +198,23 @@ public void init( TaskDetailsPresenter presenter ) {

@EventHandler("updateTaskButton")
public void updateTaskButton( ClickEvent e ) {
Long dateValue = 0l;
if(dueDate.getValue() != null ){
dateValue = dueDate.getValue();
}
Long timeValue = 0l;
if(dueDateTime.getValue() != null){
timeValue = dueDateTime.getValue();
}
Date utc2date = null;
if(dateValue + timeValue > 0 ){
utc2date = UTCDateBox.utc2date(dateValue + timeValue);
}

presenter.updateTask( taskDescriptionTextArea.getText(),
userText.getText(),
// subTaskStrategyListBox.getItemText(subTaskStrategyListBox.getSelectedIndex()),
UTCDateBox.utc2date(dueDate.getValue() + dueDateTime.getValue()), taskPriorityListBox.getSelectedIndex() );
utc2date , taskPriorityListBox.getSelectedIndex() );

}

Expand Down
Expand Up @@ -29,6 +29,7 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.FocusPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
Expand Down Expand Up @@ -425,7 +426,8 @@ public boolean error( Message message, Throwable throwable ) {
ErrorPopup.showMessage("Unexpected error encountered : " + throwable.getMessage());
return true;
}
}).complete(Long.parseLong(params.get("taskId")), identity.getName(), objParams);
}).complete(new Double(NumberFormat.getDecimalFormat().parse(params.get("taskId"))).longValue(),
identity.getName(), objParams);

}

Expand Down Expand Up @@ -459,7 +461,8 @@ public boolean error( Message message, Throwable throwable ) {
ErrorPopup.showMessage("Unexpected error encountered : " + throwable.getMessage());
return true;
}
}).saveContent(Long.parseLong(params.get("taskId").toString()), params);
}).saveContent(new Double(NumberFormat.getDecimalFormat().parse(params.get("taskId"))).longValue(),
params);
}

public void startFormModelerTask(final Long taskId, final String identity) {
Expand Down Expand Up @@ -503,7 +506,8 @@ public boolean error( Message message, Throwable throwable ) {
ErrorPopup.showMessage("Unexpected error encountered : " + throwable.getMessage());
return true;
}
} ).start( Long.parseLong( params.get( "taskId" ).toString() ), identity.getName() );
} ).start(new Double(NumberFormat.getDecimalFormat().parse(params.get("taskId"))).longValue(),
identity.getName() );

}

Expand Down
Expand Up @@ -62,6 +62,7 @@
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.cellview.client.ColumnSortEvent;
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
Expand Down Expand Up @@ -416,7 +417,7 @@ private void idColumn() {
Column<TaskSummary, Number> taskIdColumn = new Column<TaskSummary, Number>(new NumberCell()) {
@Override
public Number getValue(TaskSummary object) {
return object.getId();
return NumberFormat.getDecimalFormat().parse(String.valueOf(object.getId()));
}
};
taskIdColumn.setSortable(true);
Expand Down
Expand Up @@ -18,6 +18,7 @@

import com.github.gwtbootstrap.client.ui.DataGrid;
import com.github.gwtbootstrap.client.ui.constants.ResponsiveStyle;
import com.google.gwt.i18n.client.NumberFormat;
import org.jbpm.console.ng.ht.model.TaskSummary;

public class DataGridUtils {
Expand Down Expand Up @@ -101,7 +102,8 @@ public int getColumn() {
public static void paintRowSelected(DataGrid<TaskSummary> myTaskListGrid, Long idTask) {
for (int i = 0; i < getCurrentRowCount(myTaskListGrid); i++) {
for (int j = 0; j < myTaskListGrid.getColumnCount(); j++) {
if (!Long.valueOf(myTaskListGrid.getRowElement(i).getCells().getItem(0).getInnerText()).equals(idTask)) {
Long value = new Double(NumberFormat.getDecimalFormat().parse(myTaskListGrid.getRowElement(i).getCells().getItem(0).getInnerText())).longValue();
if (!idTask.equals(value)) {
myTaskListGrid.getRowElement(i).getCells().getItem(j).getStyle().clearBackgroundColor();
} else {
myTaskListGrid.getRowElement(i).getCells().getItem(j).getStyle().setBackgroundColor(BG_ROW_SELECTED);
Expand All @@ -114,7 +116,8 @@ public static Long getIdRowSelected(DataGrid<TaskSummary> myTaskListGrid) {
Long idTaskSelected = null;
for (int i = 0; i < getCurrentRowCount(myTaskListGrid); i++) {
if (myTaskListGrid.getRowElement(i).getCells().getItem(0).getStyle().getBackgroundColor().equals(BG_ROW_SELECTED)) {
idTaskSelected = Long.valueOf(myTaskListGrid.getRowElement(i).getCells().getItem(0).getInnerText());
idTaskSelected = new Double(NumberFormat.getDecimalFormat().parse(myTaskListGrid.getRowElement(i).getCells().getItem(0).getInnerText())).longValue();

break;
}
}
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Expand Up @@ -34,6 +34,7 @@
<modules>
<module>jbpm-console-ng-module-archetype</module>
<module>jbpm-console-ng-human-tasks</module>
<module>jbpm-console-ng-human-tasks-admin</module>
<module>jbpm-console-ng-process-runtime</module>
<module>jbpm-console-ng-business-domain</module>
<module>jbpm-console-ng-executor-service</module>
Expand Down

0 comments on commit c3f0372

Please sign in to comment.