Skip to content

Commit

Permalink
changed behavior - created or modified != null => new workitem
Browse files Browse the repository at this point in the history
issue #187
  • Loading branch information
rsoika committed Aug 19, 2016
1 parent 4e56c87 commit 120cef9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ public String delete(String uniqueID, String action) throws AccessDeniedExceptio
public boolean isNewWorkitem() {
Date created = getWorkitem().getItemValueDate("$created");
Date modified = getWorkitem().getItemValueDate("$modified");
return (modified == null || created == null || modified.compareTo(created) == 0);
//return (modified == null || created == null || modified.compareTo(created) == 0);
return (modified == null || created == null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void testBasic() {
Date someDate=new Date();
workitem.replaceItemValue("$Modified", someDate);
workitem.replaceItemValue("$Created", someDate);
Assert.assertTrue(dataController.isNewWorkitem());
Assert.assertFalse(dataController.isNewWorkitem());

someDate=new Date();
Calendar cal=Calendar.getInstance();
Expand Down

0 comments on commit 120cef9

Please sign in to comment.