带有计算数字字段的Jira错误

带有计算数字字段的Jira错误,jira,jira-plugin,Jira,Jira Plugin,我们试图根据7个变量(可在下拉列表(customfiled)中选择)计算问题内部优先级的WSJF编号 可以看到计算工作和带有wsjf编号的计算编号字段。 但是这个公式似乎总是在日志中出错,我们的jira实例甚至因为日志文件太大而崩溃 计算公式为: <!-- @@Formula: //Constants var a = 0.3; // Strategical alignment (sa) and Revenue potential (rp) are weighted 30

我们试图根据7个变量(可在下拉列表(customfiled)中选择)计算问题内部优先级的WSJF编号

可以看到计算工作和带有wsjf编号的计算编号字段。 但是这个公式似乎总是在日志中出错,我们的jira实例甚至因为日志文件太大而崩溃

计算公式为:

 <!-- @@Formula:

    //Constants
    var a = 0.3; // Strategical alignment (sa) and Revenue potential (rp) are weighted 30%
    var b = 0.2; // Saving potential (sp) and competitive advantage (ca) are weighted 20%
    var x = 2; // Is the factor for the weight of "business value" (bv) in the model
    var y = 1; // Is the factor for the weight of the "loss of value" (lv) in the model
    var z = 1; // Is the factor for the weight of the "capacity increase" (ci) in the model

    //Variables for business value
    var sa = Integer.parseInt(issue.get("customfield_11631") != null ? issue.get("customfield_11631") : 0);
    var rp = Integer.parseInt(issue.get("customfield_11632") != null ? issue.get("customfield_11632") : 0);
    var sp = Integer.parseInt(issue.get("customfield_11633") != null ? issue.get("customfield_11633") : 0);
    var ca = Integer.parseInt(issue.get("customfield_11634") != null ? issue.get("customfield_11634"): 0);
    var bv = (sa+rp)*a + (sp+ca)*b;

    //Variables for loss of value over time
    var lv = Integer.parseInt(issue.get("customfield_11635") != null ? issue.get("customfield_11635") : 0);

    //Variables for capacity increase
    var ci = Integer.parseInt(issue.get("customfield_11636") != null ? issue.get("customfield_11636") : 0);

    //Variables for investment
    var in = Integer.parseInt(issue.get("customfield_11637") != null ? (issue.get("customfield_11637") : 0);

    //WSJF calculation
    var wsjf = (x*bv+y*lv+z*ci)/in;

       return wsjf;

    -->

inti=(issue.get(“customfield_11631”)!=null?Integer.parseInt(issue.get(“customfield_11631”).toString():0)
使其正常工作。
非常感谢,"你,;如果您试图从customfield中获取值,您可能需要使用类似于
getValue()
的方法。我尝试过,但是计算没有执行任何操作,并且返回相同的错误。我应该将getValue()放在哪里?可以尝试
inti=(issue.get(“customfield_11631”)!=null?Integer.parseInt(issue.get(“customfield_11631”).toString():0)
2015-05-06 14:16:40,133 http-bio-443-exec-866 ERROR Andreas Kundert 856x2705040x1 41jq3d 192.168.37.39:63202,192.168.211.105 /secure/AjaxIssueAction.jspa [innovalog.jmcf.fields.CalculatedNumberField] CalculatedNumberField: error evaluating formula of field "WSJF (automated)" of issue BI-24: 
Sourced file: inline evaluation of: ``    //Constants  var a = 0.3; // Strategical alignment (s) and Revenue potential . . . '' : Typed variable declaration : Method Invocation Integer.parseInt : at Line: 11 : in file: inline evaluation of: ``    //Constants  var a = 0.3; // Strategical alignment (s) and Revenue potential . . . '' : Integer .parseInt ( issue .get ( "customfield_11631" ) ) 
CalculatedNumberField: error evaluating formula of field "WSJF (automated)" of issue LIAR-101: 
Sourced file: inline evaluation of: ``    //Constants  var a = 0.3; // Strategical alignment (s) and Revenue potential . . . '' : Typed variable declaration : Error in method invocation: Static method parseInt( int ) not found in class'java.lang.Integer' : at Line: 11 : in file: inline evaluation of: ``    //Constants  var a = 0.3; // Strategical alignment (s) and Revenue potential . . . '' : Integer .parseInt ( issue .get ( "customfield_11631" ) != null ? issue .get ( "customfield_11631" ) : 0 )