Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL query for getting only working days but not include non working days in JIRA 4.3

Kalyan Kumar Das
Contributor
July 1, 2018

I want jql query for SLA alert in which it starts counts only working days at the time of raise the ticket. When i created the filter it count working days and non working days. That i don't want.

Our time is:

9 am to 6 pm from Monday to Friday

 

Please suggest us.

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 3, 2018

Hi Kalyan,

Jira 4.3 would be far too old to accomplish this task as the oldest version of Jira that is supported is 7.2:

In more recent versions a feature is out that will stop the SLA clock on non-working days.

For your issue, you're asking for a JQL query that will help with that. Can you help explain to me how you would like this to work exactly? What kinds of things would you want it to do for you?

Shannon

Kalyan Kumar Das
Contributor
July 4, 2018

@Shannon S

We are setting the value for SLA like 9,18,24 and 48 and our working days is 9 am to 6 pm from Monday to Friday. The SLA counting will be start from the created date and time of ticket. If the ticket is created on non working days then the ticket will be automatically closed and create a duplicate ticket when the working days will start. The main issue is that I need to give alerts to the reporter on working days like 18 hour left for SLA breach or 9 hours left for SLA breach etc.

 

I had already created the filter that counts non working hours. That is complicated to fix the alert issue. So please suggest us how SLA alert in which it starts counts only working day.

 

   

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 4, 2018

Kaylan,

For this you would need some kind of add-on such as ScriptrRunner for Jira. However, keep in mind that this and many other add-ons only support versions of Jira that haven't yet reached End of Life. For example, ScriptRunner only supports Jira 7.2.0 through 7.10.2.

My recommendation would be to upgrade your instance so that you're on a supported version. This way you can either use our new feature that doesn't count SLA on non-working days, or at least so that you can use ScriptRunner or another Marketplace add-on.

Regards,

Shannon

Kalyan Kumar Das
Contributor
July 5, 2018

 

@Shannon S

Is there any other way to fix the issue. Please suggest us. We are having Script Runner in JIRA 4.3. 

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2018

Hi Kaylan,

Not that I'm aware of. I'm not very familiar with ScriptRunner itself, but you can give it a try, and if you have any trouble you can raise a new question in the Adaptavist collection and someone will be able to assist you.

However, be aware that since your version of Jira (and thus ScriptRunner) are so old that there may continue to be a blocker there. You definitely want to upgrade Jira as soon as you can for security reasons and to get the latest bug fixes.

Regards,

Shannon

Kalyan Kumar Das
Contributor
September 6, 2018

I fixed that issue

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 6, 2018

Kalyan,

Thank you for telling us you resolved the issue.

If you don't mind, could you share what the fix was in case other users have the same issue?

Regards,

Shannon

Kalyan Kumar Das
Contributor
September 7, 2018

@Shannon S:

Suppose one ticket is raised and SLA is set to 18 and you need to send the alert 9 hours remaining and 1 hour remain.  For that query is provided to you below:

<9 hour alert>

1. created >= "-24h 5m" AND created <= "-24H" 
Example: Ticket created on Monday to Thrusday, then the above query will be execute. 

2. created >= "-72h 5m" AND created <= "-72H"

Example: Ticket created on Friday, then the above query will be execute. 

<1 hour alert>

1. created >= "-95h 5m" AND created <= "-95h"

Example: Ticket created on Friday after 10am , then the above query will be execute. 
 
2. created >= "-47h 5m" AND created <= "-47h" 

Example: Ticket created on Monday to Thrusday after 10am , then the above query will be execute. 

3. created >= "-32h 5m" AND created <= "-32h" 


4. created >= "-80h 5m" AND created <= "-80h"

Note:

Working hour per day: 9

Non-Working hour per day: 15

Sat and Sun: 48+15<Friday evening 6pm to Monday morning 9 a.m.>=63

 

Please check and confirm.

Suggest an answer

Log in or Sign up to answer