ZIS / Tcikets Fields and USer Fields | Community
Skip to main content

ZIS / Tcikets Fields and USer Fields

  • March 14, 2024
  • 1 reply
  • 0 views

Hello,

 

I'm trying to create a ZIS that will help my users.

In fact there's for each tickets a lot of information to put consult on Ticket and User Fields. To limit navigation, I created a ZIS that populate Ticket Fields from Relevant User Fields, and update user Fields if Ticket fields is changed. It works well except for Date. I thinks that it's related to Date Format. in Ticket Fields 

      {
                "id": 17336016451101,
                "value": "2024-03-04"
            },
            {

In User Fields

"date_of_birth": "0202-02-26T00:00:00+00:00",

and I use this to get Date: 

        "Champ_age_dob_of_client": {
                            "Type": "Action",
                            "ActionName": "zis:common:transform:Jq",
                            "Parameters": {
                                "expr": ".ticket.custom_fields[] | select(.id == 17336016451101) | .value |tostring ",
                                "data.$": "$.current_ticket"
                            },
                            "ResultPath": "$.Champ_age_dob_of_client",
                            "Next": "Champ_insurance1"
                        },
 
Do you know if I can challenge that?
 
Thanks
 

1 reply

Tipene
  • April 1, 2024
Hey Denis,
 
I think you're correct that the date here is likely causing issues here. Can you try updating the jq expression in the parameters object to format the user field date correctly?  Something like this should do the trick:
 
"Parameters": {
"expr": ".ticket.custom_fields[] | select(.id == 17336016451101) | .value | fromdate? | // empty | todateiso8601",
"data.$": "$.current_ticket"
},
 
Let me know if this help!
 
Tipene