i am trying to set a custom calculated field - "how many days since a ticket was created"
So today's date minus created date = number of days
17/12/2020 - 12/12/2020 = 5 days
I don't understand what i need to do. Some specific java script workflof?
I try a lot of googling, workflow constructor and failed
Yes, this requirement can be solved by the JavaScript workflow. I recommend you use the on-schedule rule for this purpose. You need to check the creation date and current date and set the difference to the field. The possible code could look as follows:
Note that this is the sample and the real conditions will differ (e.g. the search, cron and guard sections and the field name).
I hope you will find this reference helpful.