[#423] getStartTimeMatrix performer issue

Migrated from Redmine #423 | Author: Sam Holtby
Status: New | Priority: High, I’m very impatient | Created: 2019-09-10


Hello,

I seem to be having an issue with the getStartTimeMatrix method. When I pass an array of performer IDs I get the following timeslot:

"2019-09-12": [
"08:30:00",
"10:00:00",
"11:45:00",
"13:15:00",
"14:45:00"
]

However, if I loop through each performer ID and call getStartTimeMatrix I get a list of other timeslots:

"2019-09-12": [
"11:45:00",
"13:15:00",
"14:45:00"
]

"2019-09-12": [
"08:30:00",
"10:00:00",
"15:30:00"
]

"2019-09-12": [
"09:00:00",
"10:30:00",
"12:00:00"
]

"2019-09-12": [
"08:30:00",
"10:00:00",
"13:00:00",
"14:30:00",
"16:00:00"
]

So when the getStartTimeMatrix method is called with an array of performer IDs why do the availablity times not match up?

Thank you,
Sam

Redmine Admin wrote:

Hi, pass an array of performer IDs it returns union of their working times (mainly needed for Any employee plugin)

"2019-09-12": [
"08:30:00",
"10:00:00",
"13:00:00",
"14:30:00",
"16:00:00" 

this data should also be used in union, we need to see your method call params to see if there is some bug or not

Sam Holtby wrote:

Hi, Ok here are the params for the method. As you can see, they do not match up. For example, 15:30pm is missing from the union results.

getStartTimeMatrix($dateFrom, $dateTo, $serviceId, $performer, $qty)

+Params and result with performer IDs:+

"$dateFrom": "2019-09-12",
"$dateTo": "2019-09-12",
"$serviceId": 2,
"$performerId": [
"60",
"53",
"50",
"48",
"45",
"38",
"22",
"1"
],
"$qty": 1

Results:

"2019-09-12": [
"10:00:00",
"11:45:00",
"13:15:00",
"14:45:00",
"17:00:00"
]

+Params and result for each performer ID:+
Params and results for $performerId 60:

    "$dateFrom": "2019-09-12",
    "$dateTo": "2019-09-12",
    "$serviceId": 2,
    "$performerId": "60",
    "$qty": 1
  
"2019-09-12": []

Params and results for $performerId 53:

    "$dateFrom": "2019-09-12",
    "$dateTo": "2019-09-12",
    "$serviceId": 2,
    "$performerId": "53",
    "$qty": 1
      "2019-09-12": [
        "11:45:00",
        "13:15:00",
        "14:45:00"
      ]

Params with $performerId 50:

    "$dateFrom": "2019-09-12",
    "$dateTo": "2019-09-12",
    "$serviceId": 2,
    "$performerId": "50",
    "$qty": 1
      "2019-09-12": [
        "10:00:00",
        "15:30:00",
        "17:00:00"
      ]

Params and results for $performerId 48:

    "$dateFrom": "2019-09-12",
    "$dateTo": "2019-09-12",
    "$serviceId": 2,
    "$performerId": "48",
    "$qty": 1
      "2019-09-12": []

Params and results for $performerId 45:

    "$dateFrom": "2019-09-12",
    "$dateTo": "2019-09-12",
    "$serviceId": 2,
    "$performerId": "45",
    "$qty": 1
      "2019-09-12": []

Params and results for $performerId 38:

    "$dateFrom": "2019-09-12",
    "$dateTo": "2019-09-12",
    "$serviceId": 2,
    "$performerId": "38",
    "$qty": 1
      "2019-09-12": []

Params and results for $performerId 22:

    "$dateFrom": "2019-09-12",
    "$dateTo": "2019-09-12",
    "$serviceId": 2,
    "$performerId": "22",
    "$qty": 1
      "2019-09-12": [
        "10:00:00"
      ]

Params and results for $performerId 1:

    "$dateFrom": "2019-09-12",
    "$dateTo": "2019-09-12",
    "$serviceId": 2,
    "$performerId": "1",
    "$qty": 1
      "2019-09-12": []

Dmytro Bondarev wrote:

Please provide war HTTP requests. Please note that you should not use named parameters, just pass them in ordered array.