Forums

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

Increase a field number when a same due date is selected on list of tickets.

Rajesh.Kumar January 28, 2025

Hello All,

I have a requirement regarding the Due Date field. We have a list of customer records stored as tickets. When a customer selects a due date, and the selected date matches the due date of any existing tickets in the list, the Number Field on the updated ticket should be set to 2. Additionally, if there are already existing tickets with the same due date (e.g., 5), the Number Field should increment accordingly (e.g., to 6).

Could someone please assist with configuring Jira automation to fulfill this requirement? Thank you!

 

Regards,

Rajesh

1 answer

0 votes
Trudy Claspill
Community Champion
January 28, 2025

Hello @Rajesh_Kumar 

How do you compile the list? What is the criteria for a ticket to be included in the list?

When does the due date value change? Is that only when the ticket is created?

What if the due date is changed at a later date? Do you need to update the tickets that previously matched the due date and restart the count on the ticket where the due date was changed?

Can you walk us through a scenario for multiple tickets being created over time with matching due dates? Example

  1. Ticket-1 is created with due date = 02/01/2025. No other ticket exists with this due date. What value should set in the Number Field?
  2. Ticket-2 is created with due date = 02/01/2025.
    Ticket-2 Number Field should be set to 2?
    Ticket-1 Number Field should be incremented by 1, but what was its original value?
  3. Ticket-3 is created with due date = 02/01/2025.
    Ticket-3 Number Field should be set to 2?
    Ticket-2 Number Field should be set incremented by 1, making it now 3?
    Ticket-1 Number Field should be incremented by 1, but what was its original value?
  4. Ticket-4 is created with due date = 02/01/2025.
    Ticket-4 Number Field should be set to 2?
    Ticket-3 Number Field should be set incremented by 1, making it now 3?
    Ticket-2 Number Field should be set incremented by 1, making it now 4?
    Ticket-1 Number Field should be incremented by 1, but what was its original value?

 

And what should happen if the date on one of these tickets is changed to some other date?

 

What problem are you trying to solve by recording this information? What do you plan do do with the information?

If we understand your use case we might be able to suggest alternatives.

Rajesh.Kumar January 28, 2025

Hi @Trudy Claspill  Thanks for the response,

Actually we created tickets for the customers which are around 90. With in these 90 tickets they update due date.

 

  1. Ticket-1 is created with due date = 02/01/2025. No other ticket exists with this due date. What value should set in the Number Field?

By default number field value is zero, If due date is empty for all the ticket and now it got updated with 02/01/2025, then the number should be updated with 1 on Ticket-1.

  1. Ticket-2 is created with due date = 02/01/2025.
    Ticket-2 Number Field should be set to 2?
    Ticket-1 Number Field should be incremented by 1, but what was its original value?

Now the ticket-1 is having date selected and again user comes and select same date which is 02/01/2025 in Ticket-2, then the number field value should be increased to 2 on current ticket and Ticket-1. If user selected other date like 05/02/2025 then the number field should increments with 1. 

If Ticket-10 due date is selected with 05/02/2025, then on that ticket the number field should increase to 2 on both current and Ticket-2.

Purpose of This Automation:

  • These tickets are being used for desk booking, and each date has a maximum booking limit (e.g., 8 bookings per day).
  • If the number of bookings exceeds the limit, the system should either:
    1. Block the user from selecting that date.
    2. Send an alert and remove the selected due date, notifying the user that the booking limit has been exceeded.

 

If there are any alternate ways please suggest. Thanks

 

Regards,

Rajesh

Trudy Claspill
Community Champion
January 29, 2025

Hello @Rajesh_Kumar 

Thank you for clarifying the requirement. Let me repeat it back to make sure I understand.

You want all tickets that have the same Date to have their Number field set to the total count of tickets that share that date.

You want to check what that total count is. If it exceeds a specified limit, action needs to be taken.

  • Preventing the user from selecting the date is not something that could be done with native functionality.
  • Clearing the date field and sending an email to the user is something that could be done with native functionality.

 

1. What would you expect to happen if the date was set, but then gets changed? Would you expect the counts in tickets that had the original date to be recalculated?

2. Are there any other criteria besides date that you use to include or exclude tickets in the count? For instance, do they have to be the same type of ticket, in the same project, have the same Status (or not be "done")?

 

Your requirement could be achieved using the Automation Rules functionality. Are you familiar with that feature?

https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/

The logic needing to be implemented would be something like this:

WHEN: date field is changed

IF: original value was not blank
- Lookup Issues that had the Original Value
- Change the Number field to the new count

IF: new value is not blank
- Lookup Issues that had the New Value
- IF the count of issues is below the limit
--- Change the Number field to the new count
- ELSE
--- Clear the date field
--- Send an email to the user

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events