Improve Date Reports with Automation

お困りですか?

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

コミュニティに質問

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

要約

There is times on which we would like to know exactly when a ticket was created and create reports of these based on Yearly, Monthly, Day or even time intervals.

Currently while is possible to some extent there is a simple way on which you can do these and never lose a beat on any of your reporting.

ソリューション

We will use Automation to add timestamps to our tickets from when they are created. To achieve this, we will need to create a Text Custom Field.

For this example we will name the field “Date Entry”.

Documentation to create a custom field can be found here: Create a Custom Field.

Now that we have our Custom Field, we will create an Automation with the following syntax:

  • Trigger: Issue Created.

  • Action: Edit Issue Field.

    • Smart Value to Use: {{issue.created.fullDate}} or {{issue.created.fullDateTime}} if you need exact time with hours and minutes.

This will make sure your tickets always have a Created Date printed on a field which you can query for easily.

For a list of full Smart Values you can use for your Date Format you can visit this page:

Jira スマート バリュー - 日時

Add Created Date to Old Issues

Adding the Created Date to your previous issues is quite simple, however this is limited to 100 tickets every 12 hours as per Automation Throttling Limits, so it is recommended that you do this in small batches.

Syntax for this Automation will be the following:

  • Trigger: Scheduled Trigger with At least 12 hours between each run.

  • Action: Edit Issue Field.

    • Smart Value to Use: {{issue.created.fullDate}} or {{issue.created.fullDateTime}} if you need exact time with hours and minutes.

NOTE: Your JQL Query should always look for EMPTY on the Custom Field you created, this is to avoid reworking tickets that already have a date.

After enough time has passed, all of your tickets should be updated with the Created Date and you would be able to start making Queries against this field.

How to query the new Created Date

Now that we have everything in place, performing a query of tickets can be done with the following methods:

  • Search for Weekend Tickets

"Date Entry[Short text]" ~ "Sunday" or "Date Entry[Short text]" ~ "Saturday"
  • Search for Tickets Created on Sundays and Saturdays for 2022

"Date Entry[Short text]" ~ "Sunday" and "Date Entry[Short text]" ~ "2022" or 
"Date Entry[Short text]" ~ "Saturday" and "Date Entry[Short text]" ~ "2022"
  • Search for all tickets created within a year or month

Month Search
"Date Entry[Short text]" ~ "November"

Year Search 
"Date Entry[Short text]" ~ "2022"

The above examples can be expanded to fit your needs, you can consult on how to use JQL in depth here:

Use Advanced Jira Query Language (JQL)

最終更新日: 2023 年 1 月 16 日

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

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