Created
November 20, 2019 11:18
-
-
Save iaindooley/adcdbcda0eaf4c634b9bf4127f445f88 to your computer and use it in GitHub Desktop.
Create report every hour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createReportEveryHour(params,signature,original_time) | |
{ | |
var board = new Board(params); | |
var must_count = 0; | |
var nice_count = 0; | |
board.cards().each(function(card) | |
{ | |
try | |
{ | |
card.label("Must"); | |
must_count++; | |
} | |
catch(e) | |
{ | |
Notification.expectException(InvalidDataException,e); | |
} | |
try | |
{ | |
card.label("Nice"); | |
nice_count++; | |
} | |
catch(e) | |
{ | |
Notification.expectException(InvalidDataException,e); | |
} | |
}); | |
Card | |
.findOrCreate(board.findOrCreateList("Reports"),"Must/Nice") | |
.setDescription("Must: "+must_count+"\nNice: "+nice_count); | |
ExecutionQueue.push(createReportEveryHour,params,signature,original_time.addMinutes(60)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment