Jira Product DiscoveryのAutomation機能を使用して日付の計算を行いたいです。
Jira Softwareのプロジェクトではうまく動作していた設定がうまく動きません。
どうしたらよいでしょうか?
Jira Product Discoveryの日付フィールド値は、”start”と”end”のキー/値を含む 以下のようなJSON 文字列として保存されます。
Start Date field:
"customfield_10164": "{\"start\":\"2023-10-01\",\"end\":\"2023-12-31\"}"
そのため、Jira の他の日付フィールドとは異なり、日付の計算を行うためには以下の手順が必要となります
「substringbetween」関数を使用して、日付を取得
次に「toDate」関数を使い文字列から日付オブジェクトに変換
上記の処理を行うことで、Jiraの他の日付フィールドと同様に日付の計算を行うことができます。
以下、Jira Product Discoveryの日付フィールドのAutomation上の日付計算サンプルとなります。ご参考にしていただければ幸いです。
例:startDate と現在日 との日付の差分を計算する
{{now.diff(issue.<your_field_ID>.substringBetween( "{\"start\":\"","\",\"end\"").toDate).days.abs}}
ご案内は以上となります。
M.Shimizu
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
0 comments