Set a Field as a Function of other fields

Issue #255 resolved
Lacey McDonnell created an issue

Unfortunately, the post function is not working as expected. I followed the wiki but I get the attached screenshot exception errors for the also attached values entered

This is currently messing up our Tempo Timesheets account reporting :(

Comments (16)

  1. Fidel Castro Armario repo owner

    Hi Lacey,

    Did the problem appear after upgrading to version 2.2.8? In affirmative case, which was your previous version of the plugin?

  2. Lacey McDonnell reporter

    Unfortunately it happened with the previous version as well, 2.2.7 - I updated it to 2.2.8 thinking it would fix the parse error, but to no avail.

    FULL ERROR: (ACE Insurance Company of Puerto Rico)ACESUPPORT :: PARSE ERROR : Encountered " "ACESUPPORT "" at line 1, column 1. Was expecting one of: "-" ... ... "(" ... "round" ... "floor" ... "ceil" ... "abs" ... "remainder" ... "sqrt" ... "cbrt" ... "random" ... "pow" ... "max" ... "min" ... "modulus" ... "log10" ... "log" ... "sin" ... "cos" ... "tan" ... "asin" ... "acos" ... "atan" ... "sinh" ... "cosh" ... "tanh" ... "toDegrees" ... "toRadians" ... "numberOfSelectedItems" ... "numberOfAvailableItems" ... "length" ... ... ... "previousValue" ... "second" ... "minute" ... "hour" ... "dayOfTheWeek" ... "dayOfTheMonth" ... "month" ... "year" ... "timePart" ... "datePart" ... "addDaysSkippingWeekends" ... "addTimeSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "addMonths" ... "addYears" ... "null" ... "toNumber" ... "stringToDate" ... "first" ... "last" ... "nthElement" ... "indexOf" ... "count" ... "numberOfRemoteIssueLinks" ... "sum" ... "avg" ... "(" ... ... "null" ... ... "null" ... "previousValue" ... "null" ... "previousValue" ... "null" ... "null" ... ... ... "(" ... "-" ... "toNumber" ... "round" ... "floor" ... "ceil" ... "abs" ... "sqrt" ... "random" ... "max" ... "max" ... "min" ... "min" ... "pow" ... "remainder" ... "modulus" ... "numberOfSelectedItems" ... "numberOfAvailableItems" ... "length" ... ... "second" ... "minute" ... "hour" ... "dayOfTheWeek" ... "dayOfTheMonth" ... "month" ... "year" ... "timePart" ... "datePart" ... "addMonths" ... "addYears" ... "addDaysSkippingWeekends" ... "addDaysSkippingWeekends" ... "addTimeSkippingWeekends" ... "addTimeSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "count" ... "count" ... "count" ... "numberOfRemoteIssueLinks" ... "first" ... "last" ... "nthElement" ... "avg" ... "sum" ... "previousValue" ... "stringToDate" ... "stringToDate" ... "indexOf" ... "indexOf" ... "indexOf" ... "indexOf" ... "log" ... "log10" ... "cbrt" ... "sin" ... "cos" ... "tan" ... "sinh" ... "cosh" ... "tanh" ... "asin" ... "acos" ... "atan" ... "toDegrees" ... "toRadians" ... "null" ... ... ... "(" ... "-" ... "toNumber" ... "round" ... "floor" ... "ceil" ... "abs" ... "sqrt" ... "random" ... "max" ... "max" ... "min" ... "min" ... "pow" ... "remainder" ... "modulus" ... "numberOfSelectedItems" ... "numberOfAvailableItems" ... "length" ... ... "second" ... "minute" ... "hour" ... "dayOfTheWeek" ... "dayOfTheMonth" ... "month" ... "year" ... "timePart" ... "datePart" ... "addMonths" ... "addYears" ... "addDaysSkippingWeekends" ... "addDaysSkippingWeekends" ... "addTimeSkippingWeekends" ... "addTimeSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "count" ... "count" ... "count" ... "numberOfRemoteIssueLinks" ... "first" ... "last" ... "nthElement" ... "avg" ... "sum" ... "previousValue" ... "stringToDate" ... "stringToDate" ... "indexOf" ... "indexOf" ... "indexOf" ... "indexOf" ... "log" ... "log10" ... "cbrt" ... "sin" ... "cos" ... "tan" ... "sinh" ... "cosh" ... "tanh" ... "asin" ... "acos" ... "atan" ... "toDegrees" ... "toRadians" ... "(" ... "previousValue" ... "first" ... "last" ... "nthElement" ... "(" ... "(" ... "(" ... "first" ... "last" ... "nthElement" ... "(" ... ... "null" ... ... "null" ... "previousValue" ... "null" ... "previousValue" ... "null" ... "null" ... ... ... "(" ... "-" ... "toNumber" ... "round" ... "floor" ... "ceil" ... "abs" ... "sqrt" ... "random" ... "max" ... "max" ... "min" ... "min" ... "pow" ... "remainder" ... "modulus" ... "numberOfSelectedItems" ... "numberOfAvailableItems" ... "length" ... ... "second" ... "minute" ... "hour" ... "dayOfTheWeek" ... "dayOfTheMonth" ... "month" ... "year" ... "timePart" ... "datePart" ... "addMonths" ... "addYears" ... "addDaysSkippingWeekends" ... "addDaysSkippingWeekends" ... "addTimeSkippingWeekends" ... "addTimeSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "count" ... "count" ... "count" ... "numberOfRemoteIssueLinks" ... "first" ... "last" ... "nthElement" ... "avg" ... "sum" ... "previousValue" ... "stringToDate" ... "stringToDate" ... "indexOf" ... "indexOf" ... "indexOf" ... "indexOf" ... "log" ... "log10" ... "cbrt" ... "sin" ... "cos" ... "tan" ... "sinh" ... "cosh" ... "tanh" ... "asin" ... "acos" ... "atan" ... "toDegrees" ... "toRadians" ... "null" ... ... ... "(" ... "-" ... "toNumber" ... "round" ... "floor" ... "ceil" ... "abs" ... "sqrt" ... "random" ... "max" ... "max" ... "min" ... "min" ... "pow" ... "remainder" ... "modulus" ... "numberOfSelectedItems" ... "numberOfAvailableItems" ... "length" ... ... "second" ... "minute" ... "hour" ... "dayOfTheWeek" ... "dayOfTheMonth" ... "month" ... "year" ... "timePart" ... "datePart" ... "addMonths" ... "addYears" ... "addDaysSkippingWeekends" ... "addDaysSkippingWeekends" ... "addTimeSkippingWeekends" ... "addTimeSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "subtractDatesSkippingWeekends" ... "count" ... "count" ... "count" ... "numberOfRemoteIssueLinks" ... "first" ... "last" ... "nthElement" ... "avg" ... "sum" ... "previousValue" ... "stringToDate" ... "stringToDate" ... "indexOf" ... "indexOf" ... "indexOf" ... "indexOf" ... "log" ... "log10" ... "cbrt" ... "sin" ... "cos" ... "tan" ... "sinh" ... "cosh" ... "tanh" ... "asin" ... "acos" ... "atan" ... "toDegrees" ... "toRadians" ... "(" ... "previousValue" ... "first" ... "last" ... "nthElement" ... "(" ... "(" ... "(" ... "first" ... "last" ... "nthElement" ...

  3. Fidel Castro Armario repo owner

    Can you, please, export your workflow as XML file and attach it to this issue?

  4. Fidel Castro Armario repo owner

    It's very strange, since I'm not getting the error, as you can see in the screenshot:

    Captura de pantalla 2016-02-26 a las 21.07.28.png

    Can you please try keeping only the first setting rule?

    Try also the following simple setting rule:

    (A)B
    
  5. Lacey McDonnell reporter

    I still got the parse error. I only set the first option, being

    (ACE Insurance Company of Puerto Rico)ACESUPPORT

    Error_2.PNG

  6. Lacey McDonnell reporter

    Well, (A)B worked, with other fields

    SimpleFields.PNG

    I tried changing A back to customer; that worked

    CUST_Simple.PNG

    Had a brain fart and thought, what if it just doesn't like all caps? No one likes to be yelled at?

    It worked : |

    no_caps.PNG

    Why??

  7. Fidel Castro Armario repo owner

    Are you doing all those test in the same transition as before?

    All characters in uppercase should work. Can you please try again?

    Which version of JIRA are you using?

  8. Lacey McDonnell reporter

    Same transition - BUT I forgot to change the second field back. I think that's the problem. The new account field doesn't like this post function at all.

    So using all lowercase gets this error (with or without the space between "benitez" and "support" - I tried both)

    lowercase.PNG

    changing the first b of "benitezsupport" to B results as the same very, very long parse error Encountered " "Benitezsupport "" at line 1, column 1. etc etc

    Adding quotes just does the same thing, only it's saying "Encountered " "\"" "\" "" at line 1, column 1. Was expecting one of:"

    I then tried it on another transition; same error. It seems to be the Tempo Account field that refuses to be read.

  9. Lacey McDonnell reporter

    I just looked up the database value combining the two Tempo tables needed; I have replaced all values with their numerical DB values. The parse worked; I created a few test issues and accounts is now mapping properly. Yay!

    Thank you : )

  10. Fidel Castro Armario repo owner

    Great, Lacey.

    Anyway, I will investigate why that parsing error is shown simply for selecting the wrong data type for the field.

  11. Fidel Castro Armario repo owner

    The parse error is due to Tempo custom field expect a number instead of a string value. It is not a bug,

  12. Fidel Castro Armario repo owner

    Hi @laceymcdonnell,

    Since version 2.2.39, JIRA Workflow Toolbox supports Custom Schedules, and you can do all you are doing now using addTimeSkippingWeekends () and subtractDatesSkippingWeekends () functions, and much much more.

    I recommend you to take a look at it. You will be able to do amazing things using it.

  13. Log in to comment