7 Commits

Author SHA1 Message Date
Jonathan Bernard
85753de955 PIT CLI agenda sorting, FileIssue bug fixed.
* Fixed the bug in FileIssue where it would append a blank line to the body of
  an issue every time it wrote the issue to the file. Fixed by making the
  parser consume a line break before the property section.
* Fixed PIT CLI -D option sorting of issues so that it will sort issues by
  priority, then due date.
2011-12-19 16:25:25 -06:00
Jonathan Bernard
ec7c07f81f Bug fix in FileIssue.
* Property changes that changed the filename of the underlying file were
  neglecting to update the internal file pointer to the new file.
2011-12-12 15:56:10 -06:00
Jonathan Bernard
952064d903 Fixed FileIssue formatting and extended properties.
* The extended properties table was using the maxKeyLength for both keys and
  values.
* FileIssue was not persisting the file when extended properties were updated.
2011-12-08 16:01:54 -06:00
Jonathan Bernard
846d1edc74 Filter and FileProject support for extended properties.
* Added support for extended properties to `Filter`. Unlike the basic
  properties, which allow the caller to specify a list of acceptable values, the
  extended properties only supports a map of properties, all of which must be
  available on the issue and match the given value.
* Made `Issue` a concrete class. There was no reason it could not be a concrete
  object. The main difference is that the extending classes all add some sort of
  persistence to the issue, but having an in-memory `Issue` in its most basic
  form can be useful and should be allowed.
* Changed the default priority for new issues from 9 to 5.
* Bug fix on `FileIssue.formatIssue()`. If was not properly returning its
  result leading to failure if no extended properties were given.
* Reworked `FileIssue.formatIssue()` to only print the horizontal rule
  seperating the issue text from the extended properties if there are extended
  properties to print as well.
* Changed the `FileProject.createNewIssue()` to handle extended properties and
  handle the basic properties in a manner more consistent with `Issue`. It is
  now creating an `Issue` object and using the `FileIssue.formatIssue()`
  function to write that to a new issue file, then loading that file back in as
  a `FileIssue`. This cuts down on code duplication and makes it so that the
  options map that `FileProject.createNewIssue()` expects is the same as the
  options to the `Issue` constructor.
2011-12-08 14:38:24 -06:00
Jonathan Bernard
6f58a83ad4 Multiple sort criteria to filters, bugfix, and cleanup.
* Fixed a bug in the common build. This bug is fixed in version 1.9, but I am
  patching this bug locally in 1.6 until I have evaluated 1.9 with this project.
* Moved `ExtendedPropertyHelp` to `com.jdbernard.pit` from
  `com.jdbernard.pit.file`.
* Added a number of property types to `ExtendedPropertyHelp`. New additions are:

    * `java.util.Calendar` *object -> string value only*
    * `java.util.Date` *object -> string value only*
    * `java.lang.Long` *this replaces `java.util.Integer`*
    * `java.lang.Float` *object -> string value only*
    * `java.lang.Double`
* Cleaned up the `matches(String)` and `matches(Class)` functions of
  `ExtendedPropertyHelp`
* Modified `Filter` sorter behaviours. The `issueSorter` and `projectSorter`
  fields are now allowed to be either a closure or a list of closures. A single
  closure works as it did before. The list of closures allows the caller to
  specify multiple sort criteria. The individual criteria closures are applied
  in reverse order, so that the first item in the sorter list is the most
  significant criteria. For example, if the caller set the sorter to
  `[{it.category},{it.priority}]` then the issues would be sorted first by
  priority and then sorted again by category, meaning that the resulting data
  would be ordered first by the category of the issue and then by the priority
  for issues that share the same category.
* Modified the methods in `Project` that use `Filter` objects to conform to the
  above behavior regarding sorting. It may be a better idea though to move the
  sort code all into `Filter` so that it is in one place.
* Cleaned up the code in `Status` for matching status based on given symbols or
  partial status names.
2011-12-07 18:01:18 -06:00
Jonathan Bernard
447e74f956 Implemented extended attributes on File issues.
* Created a PEG parser for issue files.
* Added parsing and formatting code to `FileIssue` to handle extended
  properties.
2011-11-21 00:46:24 -06:00
Jonathan Bernard
66b68160e5 Moved to JDB common build structure. 2011-11-20 21:00:53 -06:00