🚀 JWT 3.0 is out 🚀 

The app was completely overhauled, and so was the documentation: Jira Workflow Toolbox (Server/Data Center) Home

The page you are viewing is still valid for all app versions prior to 3.0.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

On this page


Example: Validation based on the value of a date type project property

Actually I've a validation in a transaction based on a projectProperty. The validation is this: 

 %{11312} >= projectProperty("finifacturacion") 

Where %{11312} is a selection date custom field and in the project I've defined the property: {finifacturacion=01/01/2015}

I'd like to use the value of this property in the validation message. How can I do that? I've tried the following string but it doesn't work: 

No es posible modificar los datos de facturación. La fecha tope para hacerlo era el  + projectProperty("finifacturacion").

I have included parser function stringToDate(string_date, timezone). This function returns the numeric value for string containing a date-time value for a certain timezone. To implement your validation you should use Boolean validator with math, date-time or text-string terms with the following configuration:


Boolean expression used is: {11500} >= stringToDate(projectProperty("finifacturacion"), LOCAL)

Note that:

  • {11500} is code for numeric value of certain Date Picker or Date-Time Picker custom field. This field code depends on each particular Jira instance.
  • In this example I have used timezone LOCAL, since I suppose that the literal date-time value in project property finifacturacion should be interpreted in Jira server's local timezone configuration.
  • Valid string date-time formats for project properties are: yyyy/MM/dd HH:mmyyyy-MM-dd HH:mmyyyy/MM/dd and yyyy-MM-dd, also formats relative to current time like in JQL queries: "w" (weeks), "d" (days), "h" (hours) or "m" (minutes), or format defined at property system jira.date.time.picker.java.format. In your particular case, you should write your project property like this: {finifacturacion=2015/01/01}


Other examples of that function

Related Usage Examples