JQL search time interval

Denis Shestov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2018

Hi all! 

How i can find all created issues in period time 2018/03/01 - 2018/03/07 and include only issue time period 9:00am - 06:00pm

i tryed: 

project = "AS" AND created  > "2018/03/01" AND created < "2018/03/07"

but how add condition time period 9:00am - 06:00pm?

2 answers

1 accepted

1 vote
Answer accepted
Vasiliy Zverev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2018

Unfortunatelly it is not possible to do for all day, the only option is filter for each day like this 

created > "2018/03/01 09:00" created < "2018/03/01 18:00"

Denis Shestov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2018

I suspected. that as always a necessary and seemingly simple functional I will not find :)

how to search for each day in view of the time period I knew. I wanted to scale this within the month, year, etc.

Спасибо, Василий ;) 

может плагин какой годный есть?

for all: maybe available addon?

Vasiliy Zverev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

Можно попробовать:

  • Можно сделать поле - время установки, в котором хранить только время.
  • Или воспользоваться расчетным полем из плагина ScriptRunner.
  • Также можно попробовать через SQL запрос к базе данных - смотря как часто надо.
  • Можно сделать признак, значение которого определяется временем создания.
Denis Shestov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

Спасибо! Можно несколько уточнений? 

поле "время установки" - это какое-то стандартное поле, с отображением времени? или может-быть какое-то поле есть в маркете подобное? я навскидку ничего такого не нашел. 

Что значит "признак, значение которого определяется временем создания"? это не то, о чем в первом пункте говорится? 

Vasiliy Zverev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

Всё это относится к доработкам.

Для этого нужно будет немного попрограммировать.

Как часто нужна эта информация?

Достаточно ли раз в неделю/месяц делать запрос в БД?

Denis Shestov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

Пока в рамках пользовательских отчетов. Может-быть еженедельно. 

кстати, плагин в духе учета SLA может-быть поможет? т.к. на данный момент рассматриваем такое решение. т.к. необходимо учитывать исключительно рабочие часы. 

Vasiliy Zverev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

Такое не пробовали.

Наверное лучше использовать какой-то признак для времени создания. Возможно список. Вот примерный список опций:

  • Создано в рабочее время
  • В вечернее время
  • В выходной
  • В праздничный день

Сделать слушатель на событие создания запроса и при создании это поле заполнять.

Denis Shestov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

А кто в данном случае может выступать слушателем? 

Vasiliy Zverev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

Так, с программированием похоже довольно сложно.

Можно считать, что идея согласована. 

Можно обойтись и без слушателя. Главное суть. Нужно при создании заполнять пользовательское поле. Можно это сделать в постфункциях перехода по созданию запроса. 

Мы сами для много чего используем плагин ScriptRunner. Он довольно дорогой, но у нас много доработок и это оправдано.

Попробуйте поискать какой-нибудь другой плагин для этого.

0 votes
Andrew Laden
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2019

If you have power scripts for Jira, you can do this. 

For example, see the below query which gets all day sat and sun, and before 7 AM or after 7pm)

key in silJQLExpression("(dayOfWeek(created) == \"Sat\") or (dayOfWeek(created) == \"Sun\") or (hour(created) >=19) or (hour (created) <= 6) ", "project = SD and created >= 2019-09-01 and created < 2019-10-01")

 

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=server&tab=overview

Suggest an answer

Log in or Sign up to answer