Currently we can only draw charts by grouping on a field that is a Link or Multilink type.
Extend charting to include grouping of boolean type. In the database, a Boolean can be in one of three
states: True, False, Not Set. To work on this, you need to add a boolean property to the schema.
If you restart the tracker, you should be able to modify some of the issues to set the private flag (Boolean True),
set then unset the private flag (Boolean False), or not change the private flag at all (Not Set/unknown state).
Note that the default display for a Boolean in Roundup's web interface has only two values (yes, no). Unsetting
a boolean is not an option and modifying an item (issue) to set an value will also set the Boolean property to False. Since the "unset" tri-value is treated as False by the internal code, this is correct, but is surprising.
Some trackers do use all three Boolean values, so the charting code has to handle all three values.
Currently we can only draw charts by grouping on a field that is a Link or Multilink type.
Extend charting to include grouping of boolean type. In the database, a Boolean can be in one of three states: True, False, Not Set. To work on this, you need to add a boolean property to the schema.
An example of adding a Boolean to the user class is available at: https://roundup-tracker.org/docs/customizing.html#stop-nosy-messages-going-to-people-on-vacation
With that example as a reference, please add a
private
Boolean property to issues by adding:To the definition of an issue by modifying the arguments to the IssueClass() call.
Change the
issue.item.html
template to include:between the keyword and change note fields.
Change the
issue.index.html
template to include:after the assignedto header in the first row of
<table class="list">
and add:after the
td
tag that shows the value ofassignedto
that starts:Lastly, to make it easier for you to group by Priority, change
index.search.html
to add:If you restart the tracker, you should be able to modify some of the issues to set the private flag (Boolean True), set then unset the private flag (Boolean False), or not change the private flag at all (Not Set/unknown state). Note that the default display for a Boolean in Roundup's web interface has only two values (yes, no). Unsetting a boolean is not an option and modifying an item (issue) to set an value will also set the Boolean property to False. Since the "unset" tri-value is treated as False by the internal code, this is correct, but is surprising. Some trackers do use all three Boolean values, so the charting code has to handle all three values.
If you change the private property on issues 1 and 2 to True/yes and change the private property to false on issues 3 and 4 and leave the others unchanged, the URL: http://localhost:8080/demo/issue?@sort0=activity&@group0=private&%@groupdir0=on&@columns=title,id,activity,status,assignedto,private&@filter=id&id=1,2,3,4,5,6,7,8&@pagesize=50&@startwith=0 should show you the index page with the first 8 issue grouped by the private property.
Once this is done, commit these changes so your co-workers can use it.