To set date type custom field via Automation rule when using JSON value {{now}} throws an error in Jira Product Discovery Project.

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Cloud のみ - この記事は クラウド プラットフォームのアトラシアン製品に適用されます。

要約

When we automatically set the date for a custom field via Automation rule using JSON value as {{now}}, it has below error

Error editing issues
" We couldn't save your changes. Copy your content, then try reloading the page."

When using below JSON in JPD project Automation rule:

{"fields":{"customfield_XXXXXX": "{{now}}"}}


環境

Jira Product Discovery (Cloud)

原因

Essentially, these date fields within JPD are actually a date range field, and the range is expressed with a start and end value, in the format of: {"start":"2022-12-01","end":"2022-12-31"}.
This is a little different than dates elsewhere in Jira, and because of this, if we want to copy a date from another Jira issue or use a Jira function to pull the current date, we need to format it to match what JPD is expecting.

ソリューション

By inserting the smart value for the current time within the data structure (and also escaping the internal double quote characters):

"{\"start\":\"{{now.jqlDate}}\",\"end\":\"{{now.jqlDate}}\"}"

It will automatically set the date for a custom field in Jira Product Discovery Project.



最終更新日 2024 年 7 月 29 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.