Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Changing Variable names

I would like to gain tips on changing variable names. E.g %{ticket.number} to %{complaint.number}. For the life of me, I couldnt figure it out.. so help me senpais

Comments

  • Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance.  The more information you give us the better we will be able to assist you. Thank you.

    Variables are used internally, can you not just train your agents that ticket means complaint?
  • I believe that you would find that it would take substantial code changes to achieve something like this no matter what version you are running.  I would not recommend it.
  • @blueyeguy Thanks for your response. As much as i'd like to do that, i have already renamed all instances of "tickets" to "complaints" in the entire source code.. it would seem rather inconsistent if the template variables referred to complaints as tickets.


    @ntozier Yes, the code does seem hard to follow and im not very experienced with php either. I just need to figure out where the base variables are converted then i might just be able to do it. Although i might have to do a few things such as editing $contextTypes on line265 in class.varaible.php as a follow up, it'll still be a good learning experience i suppose. Any pointers would be appriciated.

    PS: Thank you very much for your response.
  • Update in include\class.ticket.php , Line:1954, replaced 'ticket' with 'complaints'. This seems make it so that %{complaints.number} etc. are same as %{ticket.number} etc.
    However when typed %{ , the suggestion(in templates and canned responses) still shows ticket.
  • Update :
    Changing the context from ticket to complaints did the job for me.
    Changes in files from class.variables.php, class.filter-action.php,class.templates and a couple other files are required. Look for the function getVarScope(), make appropriate modifications.
    Hopefully this might help someone in the future.
  • PS: make sure you dont miss out editing the yaml files as well as ajax.content.php
Sign In or Register to comment.