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)