Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=Create+an+issue+score+custom+field+-+15482775
widthauto

Html bobswift
<iframe width="494" height="270" src="https://www.youtube.com/embed/IJZ3zHG60Zc" frameborder="0" allowfullscreen></iframe>

Bitbucket file macro
showLineNumberstrue
titleCalculateIssueScore.sil
urlhttps://bitbucket.cprime.io/projects/CAP/repos/sil-script-library/raw/Custom_Field_Scripts/CalculateIssueScore.sil?at=refs%2Fheads%2Fmaster
syntaxHighlightingJavaScript

See also

...

Code Block
int score = 0;

if(isNotNull(assignee)) {
    score += 10;
}
if(isNotNull(dueDate)){
    score += 10;
}
if(isNotNull(description)) {
    score += 10;
}

if(score < 10) {
    return "Bad";
}
else if(score >= 10 and score < 20) {
    return "OK";
}
else if(score >= 20 and score < 30) {
    return "Good";
}
else {
    return "Great";
}