0

Ticket Handling using python

I am struggling in a situation.

Here is an example of a ticket history. I want to get the data from the date and shift range.

for eg:

I'd like to request the date ="2023-01-01" and the shift = "morning" . It should return ID 37 , but if the shift is changed to afternoon, night and day after, like date = "2023-01-03" and shift = "morning" , it should also return ID 37. 

Then, if ID 38 should return, begin with the date "2023-01-03" and shift = "afternoon," and continue until the date "2023-01-05", with shift = "afternoon". 

Then, if ID 39 should return, begin with the date ="2023-01-05" and shift = "night" and continue until the date = "2023-01-07 " with shift = "morning".

Finally, if ID 40 should return, start with the date = "2023-01-07" and shift = "afternoon" instead of continuing to the next shift because this data status is resolved, so we don't show if the request calls from the date = "2023-01-07" and shift = "night."  Please see this example data and Request](https://i.stack.imgur.com/JBzWw.png)

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 09 '23 at 11:17

0 Answers0