Hello. thinking a bit more about the problem of sorting the targets, I realized that what I need is basically to know what is/are the next active targets.
So I think about expanding the target command, and this is a first proposal, to be implemented after the 1.0 release of BE. Current status: aside the --help and --complete option, the target command have only the -- resolve option that print the UUID of a given target summary I propose to add these commands: * be target --list that show all the open targets, in the correct order (see below). The target bug should then not be listed in the output of the "be list" command anymore. * be target --active [BUG-ID] that set the target as active. This means to add an "active" field to the bug properties that is used only for the target type of bugs, so there is a way to determine what is the next target (or set of targets) that need to be reached. the field is set to "inactive" (0) on target creation and it is set to "active" (1) on the command execution. When a target is closed, the field is then set again to "inactive" (0) * be target --sort [BUG-ID] [position] that set the order to use when listing of the targets. This means to add an "order" field to the bugs properties that is used only for the target type of bugs. The value of the field is numeric, and start from 1. The field is set to zero on target creation. On command execution, the field is set to the value of [position]. There is no control over the fact that two target had the same field value. When listing all the target (be target --list), the order is: - target with "order" > 0, sorting the field ascending - every other target with order = 0 * be target --reset-sort that set all the "order" field to zero Eventually, the --active, --sort, --reset-sort options can be implemented with a file, maybe target-cache, to keep all the implementation into the libbe.commands.* module, with some modification to the specifications. The advantage, when using a file, is to maintain the backward compatibility of the bug properties, so a new version with the new features will not demand a rebuild of the repository. Any comments ? bye Gianluca _______________________________________________ Be-devel mailing list [email protected] http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
