java - How to get User Input to Populate Jira Fields -
i new java , using jira misc custom fields add-on , require logic assistance solve math functions between 2 drop down fields.
field 1 "user cost" field contains 4 string selections user price posted @ end of string.
- sam costs .21
- mitch costs .419
- lance costs 2.66
- xmen costs 13.338
field 2 "usage" field contains 2 string selections:
- 24 hours (unless maintenance)
- 12 hours (7a-7p)
the argument should invoked new field called "total user cost." field automatically display correct price user , usage amount.
the equation blueprint follows:
cost*31(calendar days)*usage(12 || 24) i want form update based on user input selection of these 2 fields , other variables in equation.
this have far:
[![instance]](https://i.stack.imgur.com/glp15.png)
thank in advance feedback!
if understand correctly, first need initialize issue something. (it looks red in images variable doesn't exist)
then, can
double costsam = 0.21; string usersam = issue.get("customfield_10620"); then, if needing convert or otherwise math on usersam, need this
double samtotal = costsam * double.parsedouble(usersam); some flaws code
- you have define types values
stringordouble. - if have
string x = "hello"on 1 line,x = 0.4on next, won't work because of incompatible types - if did have compatible types on consecutive lines, first line pointless unless using value first, second line overwrites value of first one

Comments
Post a Comment