commit/mtrack: 3 new changesets

2 views
Skip to first unread message

Bitbucket

unread,
May 4, 2012, 12:28:25 PM5/4/12
to mtr...@googlegroups.com
3 new commits in mtrack:


https://bitbucket.org/wez/mtrack/changeset/46f54507beea/
changeset: 46f54507beea
user: wez
date: 2012-05-03 17:16:14
summary: avoid spamming the timeline with planning screen noise
affected #: 1 file

diff -r 21b1e8711cda66a94838268861fbc0a0df65b731 -r 46f54507beea39dc0ece808f891dcd699fc3224c inc/timeline.php
--- a/inc/timeline.php
+++ b/inc/timeline.php
@@ -160,7 +160,7 @@

echo "<div class='timeline'>";
$last_date = null;
- foreach ($events as $row) {
+ foreach ($events as $event_index => $row) {
if (--$limit == 0) {
break;
}
@@ -259,6 +259,16 @@
* but have been superseded by the repo entry instead */
continue 2;
case 'milestone':
+ if ($event_index > 0) {
+ /* Planning screen generates a lot of noisy entries */
+ $prior = $events[$event_index-1];
+ if ($prior['object'] == "milestone:$id" &&
+ $prior['reason'] == $row['reason']) {
+ // Don't count it against the limit
+ $limit++;
+ continue 2;
+ }
+ }
$eventclass = ' editmilestone';
$item = mtrack_object_id_link('milestone', $id);
break;



https://bitbucket.org/wez/mtrack/changeset/cb75955ebb86/
changeset: cb75955ebb86
user: wez
date: 2012-05-03 17:57:56
summary: fix another weird accounting bug with remaining time
affected #: 1 file

diff -r 46f54507beea39dc0ece808f891dcd699fc3224c -r cb75955ebb8622f375652814e7de84ed45e0ef74 inc/issue.php
--- a/inc/issue.php
+++ b/inc/issue.php
@@ -1420,7 +1420,14 @@
if ($revised === null) {
$delta = -$amount;
} else {
- $delta = $revised - $this->getRemaining();
+ /* we used to use getRemaining() here, but that makes negative
+ * remaining time round to 0; we need to compensate for the true
+ * values in the table in case they have gone negative, so we
+ * do a true sum */
+ list($rem) = MTrackDB::q(
+ 'select sum(remaining) from effort where tid = ?',
+ $this->tid)->fetchAll(PDO::FETCH_COLUMN, 0);
+ $delta = $revised - ($rem + $this->estimated);
}
$this->effort[] = array($amount, $delta);
$this->spent += $amount;



https://bitbucket.org/wez/mtrack/changeset/f726a5595b30/
changeset: f726a5595b30
user: wez
date: 2012-05-04 18:27:59
summary: fixup null rev problem for git commits and notification mail for git
commits that don't ref tickets.

We clearly need some unit tests for each of the SCMs we support to avoid
this imbalance happening again :-/
affected #: 3 files

diff -r cb75955ebb8622f375652814e7de84ed45e0ef74 -r f726a5595b305fc1732abef0be4c82ebe9b98968 bin/git-commit-hook
--- a/bin/git-commit-hook
+++ b/bin/git-commit-hook
@@ -92,6 +92,7 @@
}
$c = new MTrackCommitHookChangeEvent;
$c->rev = '[changeset:' . $this->repo->getBrowseRootName() . ",$rev]";
+ $c->hash = $rev;
$c->files = $files;
$c->changelog = join("\n", $log);
$c->changeby = MTrackAuth::whoami();


diff -r cb75955ebb8622f375652814e7de84ed45e0ef74 -r f726a5595b305fc1732abef0be4c82ebe9b98968 bin/send-notifications.php
--- a/bin/send-notifications.php
+++ b/bin/send-notifications.php
@@ -199,7 +199,7 @@

$code_by_repo = array();
foreach ($items as $obj) {
- if (!($obj instanceof MTrackSCMEvent)) {
+ if (!($obj instanceof MTrackSCMEvent) && !isset($obj->repo)) {
if (!isset($obj->ent)) {
continue;
}


diff -r cb75955ebb8622f375652814e7de84ed45e0ef74 -r f726a5595b305fc1732abef0be4c82ebe9b98968 inc/watch.php
--- a/inc/watch.php
+++ b/inc/watch.php
@@ -494,6 +494,8 @@
if ($obj instanceof MTrackSCMEvent) {
/* group by repo */
$nkey = "repo:" . $obj->repo->repoid;
+ } else if (isset($obj->repo) && $obj->repo instanceof MTrackSCM) {
+ $nkey = "repo:" . $obj->repo->repoid;
} else {
$nkey = $obj->object;
}

Repository URL: https://bitbucket.org/wez/mtrack/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
Reply all
Reply to author
Forward
0 new messages