Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

The dynamic queries that use the system fields(except for project) return results on an issue if the values are saved on it.(when editing the issue or for transition screens, but not for creating issues)

For the fields: versions, fixversions, components if there are more than one value, the string in the database should be like the one saved on the issue on JIRA. (example: "v1, v2"  with comma and a space between the versions and so on ...).

Note

Dynamic query using dates values

Normally in the WHERE clause we can have only columns of text type in combination with dynamic custom fields. If in the WHERE clause a date column (or some other type different from text) is used, the query does not work.

For instance if the column testdate is numeric in the table testTable, the following query:

Code Block
select testdate, col1, col2 from worklog where testdate = {created};

does not work, because the value of the {created} is a string.

The solution is to use functions available for the database chosen, to transform from string to the type of the column in the SQL query.

For instance, for PostgreSQL: SELECT testdate, col1, col2 from worklog WHERE testdate = cast({created} as timestamp);

For the dates(created, updated) the date from the database should be like the following example:"2012-03-12 17:40:34.973".

 

Here it is an example using system fields: .

...