Advertisement
cezeta

Untitled

Jul 27th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function parseCustomValue(customField) {
  2.     var value = parseFloat(workItem.getCustomValue(customField));
  3.     if(!value || value < 0) {
  4.     var value = 0;
  5.     }
  6.     return value;
  7. }
  8.  
  9. var ubv =  parseCustomValue("userBusinessValue");
  10. var tc = parseCustomValue("timeCriticality");
  11. var rroev = parseCustomValue("rROEnablementValue");
  12. var js = parseCustomValue("initialStoryPoints");
  13.  
  14. result = (ubv + tc + rroev) / js;
  15.  
  16. if(!result || result == Infinity)    {
  17.     result = 0;
  18. }
  19.  
  20. result.toFixed(2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement