数式でサポートされている関数
This feature is currently available as a beta experience. Some functionality might not yet be available in your Jira space. Read more about what’s coming
数式フィールドを使用すると、計算されたデータを Jira 作業項目に直接表示できます。数式フィールドとその作成方法の詳細については、こちらをご確認ください。
Jira スペースのフィールドと下記に示すサポート対象の関数や演算子を使用して数式を作成できます。Rovo が有効になっている場合は、自然言語を使用して数式を記述できます。カスタム フィールドの作成時に [数式を生成] を選択するか、[数式を修正] を選択して無効な数式の修正案を取得します。
数式は、単一の作業項目内のデータのみを使用して実行できます。たとえば、作業項目 A の数式フィールドでは、作業項目 A にすでに表示されているコストの合計のみを計算できます。作業項目 B や C、またはその他の作業項目のコストを計算することはできません。
数式の書き方
数式の記述形式は FUNCTION_NAME(parameters) です。ここで、FUNCTION_NAME は呼び出し対象の関数の名前、parameters はその関数への入力としてコンマ区切りで記述したパラメーターのリストです。
パラメーター リストには、数値フィールド参照、整数、または別の式 (それ自体で関数呼び出しを行うものも含む) を任意に組み合わせて含めることができます。フィールドは中括弧で囲むことで参照できます。たとえば、MIN({Project Cost}, 30 * MAX({Day Rate}, 100) のようにします。
数式でサポートされている関数
The following functions are supported for custom formula fields in Jira.
Number functions
機能 | 説明 | 例 |
|---|---|---|
| 値を足し合わせた結果を計算します。 | field1 の値が 6 で、field2 の値が 10 であるとします。 数式 SUM({field1}, {field2}) は値として 16 を返します。 |
| 値の平均を計算します。 | 3 つのフィールドがあり、field1 の値が 3、field2 の値が 5、field3 の値が 7 であるとします。 数式 AVG({field1}, {field2}, {field3}) は値として 5 を返します。 |
| 選択したフィールドから最大値を返します。 | field1 の値が 20 で、field2 の値が 18 であるとします。 数式 MAX({field1}, {field2}) は値として 20 を返します。 |
| 選択したフィールドから最小値を返します。 | field1 の値が 20 で、field2 の値が 18 であるとします。 数式 MIN({field1}, {field2}) は値 18 を返します。 |
| 値を他の値で割った結果を計算します。 | field1 の値が 6 で、field2 の値が 2 であるとします。 数式 DIV({field1}, {field2}) は結果として 3 を返します。 |
| 値に他の値または指定した数値を掛けた結果を計算します。 | field1 の値が 2 で、field2 の値が 3 であるとします。 数式 MULTIPLY({field1}, {field2}) は結果として 6 を返します。 |
| 値から他の値または指定した数値を引いた結果を計算します。 | field1 の値が 12 で、field2 の値が 3 であるとします。 数式 MINUS({field1}, {field2}) は結果として 9 を返します。 |
| 指定した指数で累乗された値を計算します。 | field1 の値が 9 で、それを 1.5 乗するものとします。 数式 POWER({field1}, 1.5) は結果として 27 を返します。 |
| 値を指定した小数点の桁数に丸めます。 | field1 の値が 35.7845 で、小数点以下 3 桁に丸めるものとします。 数式 ROUND({field1}, 3) は結果として 35.785 を返します。 |
| 値を指定した小数点の桁数に切り上げます。 | field1 の値が 35.784 で、小数点以下 2 桁に切り上げるものとします。 数式 ROUNDUP({field1}, 2) は結果として 35.79 を返します。 |
| 値を指定した小数点の桁数に切り捨てます。 | field1 の値が 35.784 で、小数点以下 2 桁に切り捨てるものとします。 数式 ROUNDDOWN({field1}, 2) は結果として 35.78 を返します。 |
| 値を指定した倍数に切り捨てます。 | field1 の値が $8.8037 で、これを 5 セント単位の最も近い倍数に切り捨てて表示するものとします。 数式 FLOOR({field1}, 0.05) は結果として $8.80 を返します。 |
| 値を指定した倍数に切り上げます。 | field1 の値が $8.8037 で、これを 5 セント単位の最も近い倍数に切り上げて表示するものとします。 数式 CEIL({field1}, 0.05) は結果として $8.85 を返します。 |
| 値の絶対値 (0 からの距離) を計算します。 | field1 の値は -8 です。 数式 ABS({field1}) は結果として 8 を返します。 |
| 最も近い奇数に値を切り上げます。 | field1 の値が 35.784 であるとします。 数式 ODD({field1}) は結果として 37 を返します。 |
| 最も近い偶数に値を切り上げます。 | field1 の値が 35.784 であるとします。 数式 EVEN({field1}) は結果として 36 を返します。 |
| 値の平方根を計算します。 | field1 の値が 9 であるとします。 数式 SQRT({field1}) は結果として 3 を返します。 |
テキスト関数
機能 | 説明 | 例 |
|---|---|---|
| Combines specified text values into one new text value. | You have a work item where the summary field is “Q3 work item”. The formula CONCATENATE({Summary}, " (important)") would result in the following output: “Q3 work item (important)” |
| Returns the first character or a specified number of characters from the start of a text value. | You have a work item where the summary field is “Q3 work item”. The formula LEFT({Summary}, 5) would result in the following output: “Q3 wo” |
| Returns the last character or a specified number of characters from the end of a text value. | You have a work item where the summary field is “Q3 work item”. The formula RIGHT({Summary}, 5) would result in the following output: “ item” |
| Replaces text in a specific part of a text value. | You have a work item where the summary is “Q3 work item”. The formula REPLACE({Summary}, "Q3", "Q4") would result in the following output: “Q4 work item” |
| Removes all spacing in a text value except for single spaces between words. | You have a work item where the summary is “ Badly formatted work item with r a n d o m spaces “ The formula TRIM({Summary}) would result in the following output: “Badly formatted work item with r a n d o m spaces“ |
| Returns TRUE or FALSE depending on whether a text value contains or doesn’t contain specified text. | You have a work item where the summary is “Q3 work item”. The formula TEXT_CONTAINS({Summary}, "work") would result in the following output: “TRUE” |
| Combines text values into one new text value, separated by a specified character. | The formula JOIN(",", "VIC", "NSW", "QLD") would result in the following output: “VIC,NSW,QLD” |
| Converts all letters in a text value from uppercase to lowercase. | You have a work item where the summary is “Q3 work item”. The formula LOWER({Summary}) would result in the following output: “q3 work item” |
| Converts all letters in a text value from lowercase to uppercase. | You have a work item where the summary is “Q3 work item”. The formula UPPER({Summary}) would result in the following output: “Q3 WORK ITEM” |
| Returns the number of characters in a text value. | You have a work item where the summary is “Q3 work item”. The formula LENGTH({Summary}) would result in the following output: 12 |
| Converts a number value into a text value. | You have a work item where there is a Number field 1 with a value of -10. The formula TEXT({Number field 1}) would result in the following output: 10 |
Date and time functions
機能 | 説明 | 例 |
|---|---|---|
| Converts a date value to a specified format. | 数式 FORMAT_DATE({Date field}, "dd/MM/yyyy")Reference field values:
Expected output: “12/01/2026“ |
| Converts a date value to a specified format and timezone. | 数式 FORMAT_DATE({Datetime field}, "dd/MM/yy hh:mm a", "Australia/Melbourne")Reference field values:
Expected output: “12/01/26 11:34:56 PM“ (using +11 hour offset for Melbourne summer/daylight savings time) |
| Returns the number of hours between two times. | 数式 HOURS_DIFF({Datetime field 1}, {Datetime field 2})Reference field values:
Expected output: 22.25 |
| Returns the number of minutes between two times. | 数式 MINUTES_DIFF({Datetime field 1}, {Datetime field 2})Reference field values:
Expected output: 1,335 |
| Returns the number of seconds between two times. | 数式 MINUTES_DIFF({Datetime field 1}, {Datetime field 2})Reference field values:
Expected output: 80,100 |
| Returns the number of weekdays between two days. | 数式 WORKDAY_DIFF({Date field 1}, {Date field 2})Reference field values:
Expected output: 3 Exclusive of start date, inclusive of end date. |
| Adds a specified number of weekdays to a date value. | 数式 ADD_WORKDAY({Date field}, 5)Reference field values:
Expected output: |
| Converts the year from a date value into a number value.
| 数式 YEAR({Datetime field}, "America/New York")Reference field values:
Expected output: 2026 |
| Converts the month from a date into a number value. | 数式 MONTH({Datetime field}, "America/New York")Reference field values:
Expected output: 1 1 for January. |
| Converts the day from a date into a number value. | 数式 DAY({Datetime field}, "America/New York")Reference field values:
Expected output: 7 (note: when transforming the datetime value to the specified time zone of “America/New York”, the local time representation of that datetime would be 2026-01-07 19:00:00 (-5 hours offset) - taking the “day” value of this datetime gives the value of 7) 7 for January 7th |
| Converts the hours from a time into a number value. | 数式 HOUR({Datetime field}, "Australia/Adelaide")Reference field values:
Expected output: 1 1st hour of the day |
| Converts the minutes from a time into a number value. | 数式 MINUTE({Datetime field}, "Australia/Adelaide")Reference field values:
Expected output: 30 30th minute of the hour |
| Converts the seconds from a time into a number value. | 数式 SECOND({Datetime field})Reference field values:
Expected output: 30 30th second of the minute |
| Converts numbers into a date value. | 数式 DATE(2026, 1, 12)Expected output: |
| Adds a specified number of days to a date value. | 数式 ADD_DATE({Date field}, 5)Reference field values:
Expected output: |
| Returns TRUE or FALSE depending on whether a date or datetime value does or doesn’t occur after a specified date or datetime. | 数式 IS_AFTER({Date field 1}, {Date field 2})Reference field values:
Expected output: |
| Returns TRUE or FALSE depending on whether a date or datetime value does or doesn’t occur before a specified date or datetime. | 数式 IS_BEFORE({Date field 1}, {Date field 2})Reference field values:
Expected output: |
| Returns a specific point in time from the year, month, day, time, and timezone you provide. | 数式 IS_AFTER({Datetime field}, DATETIME(2026, 1, 8, 0, 0, 0, "America/New York"))Reference field values:
Expected output: |
| Returns the date from a point in time in a specified timezone. | 数式 DATETIME_TO_DATE({Datetime field}, "America/New York"))Reference field values:
Expected output: |
Duration functions
機能 | 説明 | 例 |
|---|---|---|
| Returns the number of seconds between two times. | 数式 DATETIME_DIFF({Datetime field 1}, {Datetime field 2})Reference field values:
Expected output: 80,100 |
| Returns the number of seconds between two dates. | 数式 DATE_DIFF({Date field 1}, {Date field 2})Reference field values:
Expected output: 86,400 |
| Returns the number of days between two dates. | 数式 DAY_DIFF({Date field 1}, {Date field 2})Reference field values:
Expected output: 5 Exclusive of start date, inclusive of end date. |
| Converts a specified number of a time unit into seconds. | 数式 TO_SECONDS({Number field}, "weeks")Reference field values:
Expected output: 2,419,200 |
数式でサポートされている演算子
Jira の数式フィールドでは、次の演算子がサポートされています。
算術演算子
+(加算)-(減算)*- 乗算/- 除算^- 累乗 (例:ある数を別の数で累乗)
Conditional operators
=is equal to!=is not equal to>is greater than<is less than>=is greater than or equal to<=is less than or equal toIFreturns different results based on whether a value meets or fails specified criteriaANDreturns TRUE or FALSE depending on whether a value meets or fails all specified criteriaORreturns TRUE if a value meets at least one of the specified criteria, or FALSE if it doesn’t meet anyNOTreturns TRUE if a value doesn’t meet the specified criteria, or FALSE if it doesIS_NONEchecks whether a referenced field or value is NONE or otherwise empty, enabling formulas to still return a result
この内容はお役に立ちましたか?