tomolimo / processmaker

GLPI plugin that provides an interface with ProcessMaker (http://www.processmaker.com/)
30 stars 11 forks source link

Case Variables not working inside sql query #85

Closed rohit-ambre-uno closed 1 year ago

rohit-ambre-uno commented 5 years ago

Hello @tomolimo, I have recently started testing Processmaker-3.4.5 and Processmaker-server-3.3. I have used processmaker 3.2.8/3.3.2 and processmaker-3.0-RE-1.8 in which I use select2 for some of my dropdowns and it is working fine. While I was testing processmaker-3.4.5 and processmaker-server-3.3 I noticed that case variables are not getting evaluated in sql query. I have raised same issue in processmaker forum issue link

Because when I tried running same process in processmaker it is working fine.

To run process in processmaker with case variables from glpi, I set that case variable in trigger which was triggered before the dynaform. eg. @@stateVariable = 2; and then I used Dropdown field with some query like select id, name from glpi_tickets where status=@@stateVariable

This query works in Processmaker but fails in GLPI.

While testing all this I was using Select2 for dropdown and implementation for same can be found in processmaker forum. But all this query and dropdown works without select2 i.e. normal dropdown web control of processmaker.

tomolimo commented 5 years ago

Hello @rohit-ambre-uno I also had troubles using the Select2 dropdowns in dynaforms in the past, so that I switched to Suggest dropdowns instead. Could you send me your process, and I'll try it in my environment? Regards, Tomolimo

rohit-ambre-uno commented 5 years ago

This is sample process with simple query consisting of one variable 'GLPI_TICKET_STATUS' is a custom case variable made by me in plugin, You can also test with other variables.

test_process.zip

rohit-ambre commented 5 years ago

Hi, Any update on this issue?

currently I am testing Processmaker-server 3.3.0-community-RE-1.5 with plugin version 3.4.13 and I'm still facing same issue here. I have select2 category dropdown in my first task which displays list of categories based on logged in user but if I use @@USER_LOGGED variable I am not getting any results in dropdown but if I remove select2 use normal dropdown web control it shows the result.

Any suggestion here....

Thank you

tomolimo commented 4 years ago

Hello @rohit-ambre-uno Sorry for my late answer. I have not yet look into your process, but I may have some times next week. Thank you, Regards, Tomolimo

tomolimo commented 3 years ago

Hello @rohit-ambre-uno Sorry for my late answer. I'm currently looking into your process, and I can see that:

  1. there is no connection to GLPI database
  2. there is a plugin that I don't know: tickettype, what is this plugin?

Thank you, Regards, Tomolimo