Permalink
Browse files

initial commit

  • Loading branch information...
1 parent d180d06 commit 0d3a23c27a1ab48d2422532a35423a8ebe387dd0 @kraag22 committed Aug 25, 2012
Showing with 69 additions and 0 deletions.
  1. +54 −0 content.js
  2. +2 −0 jquery-1.8.0.min.js
  3. +13 −0 manifest.json
View
@@ -0,0 +1,54 @@
+
+
+var open_count = 0;
+var open_sum = 0;
+$('td[_state="Open"] div[data-name="Story points"]').each(function() {
+ if ($.isNumeric($(this).html())) {
+ open_sum = open_sum + parseInt($(this).html());
+ open_count++;
+ }
+});
+
+var progress_count = 0;
+var progress_sum = 0;
+$('td[_state="In Progress"] div[data-name="Story points"]').each(function() {
+ if ($.isNumeric($(this).html())) {
+ progress_sum = progress_sum + parseInt($(this).html());
+ progress_count++;
+ }
+});
+
+var fixed_count = 0;
+var fixed_sum = 0;
+$('td[_state="Fixed"] div[data-name="Story points"]').each(function() {
+ if ($.isNumeric($(this).html())) {
+ fixed_sum = fixed_sum + parseInt($(this).html());
+ fixed_count++;
+ }
+});
+
+var verified_count = 0;
+var verified_sum = 0;
+$('td[_state="Verified"] div[data-name="Story points"]').each(function() {
+ if ($.isNumeric($(this).html())) {
+ verified_sum = verified_sum + parseInt($(this).html());
+ verified_count++;
+ }
+});
+
+
+$('#board th.sb-column-title a').each(function() {
+
+ if ($(this).html().indexOf("Open") >= 0) {
+ $(this).append("("+open_count+" tasks, "+open_sum+" story points)");
+ }
+ else if ($(this).html().indexOf("In Progress") >= 0) {
+ $(this).append("("+progress_count+" tasks, "+progress_sum+" story points)");
+ }
+ else if ($(this).html().indexOf("Fixed") >= 0) {
+ $(this).append("("+fixed_count+" tasks, "+fixed_sum+" story points)");
+ }
+ else if ($(this).html().indexOf("Verified") >= 0) {
+ $(this).append("("+verified_count+" tasks, "+verified_sum+" story points)");
+ }
+});
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,13 @@
+{
+ "name": "YouTrack storypoints counter",
+ "version": "1.0",
+ "manifest_version": 2,
+ "description": "This extension counts and highlights storypoints in agile board in youtrack.",
+ "content_scripts": [
+ {
+ "matches": ["http://yt.section.cz/*"],
+ "js": ["jquery-1.8.0.min.js", "content.js"]
+ }
+ ]
+}
+

0 comments on commit 0d3a23c

Please sign in to comment.