-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 2.5.0: group not added to requesters #629
Comments
Hi 1st question: 2nd question: |
1 2 there is no feature for that now. Forms are displated to the user by popularity or alphabetically. The popularity of a form increases when a user answers it. |
Please show me the target ticket definition of this form, to see how groups shoudl be aded (from a question, a fixed group, ..) |
This screenshot shows the user filling the form is added to the target ticket. There is not any group to add as requester, then the plugin seems to behave as expected. |
I have this setup for all my forms and the group is added automatically with the requester |
Then the group comes from a ticket template. In my opinion, if the template assigns actors, they should be added to those defined in the target item. I need to determine if this is a regression. did this worked with previous version of the plugin (2.4.x ) ? |
nothing in my other templates and it was working with 2.4.0 but not for all forms, so I suppose it does not come from 2.5.0. How the requester is able to be added automatically with the associated requester ? |
OK I mark this as bug for version 2.5.2 or later. (2.5.1 is planned for PHP 5.4 comaptibility ) |
ok thx |
@satyan01 Maybe the group was added by the "Behaviors" plugin? I'm also trying to get this to work (automatically adding the user's groups to requesters), but so far no luck. As long as I don't use a form, the groups add themselves correctly (using Behaviors), but if I use a form nothing happens. |
Hi This might explain why the target ticket does not have any group. @satyan01 please confirm if you use the Behaviors plugin to add a group. |
To be more precise: I'm currently using GLPI 9.1.3, Behaviors 1.3, FormCreator 2.4.2. (Although I just tested 2.5.1, and no change) |
Hello yes I confirm to use Behavior plugin |
In Behaviors plugin, adding of group requester is done in pre_item_add to after have mechanism of the core. |
Thank you @yllen for this information. I think shall do the same in FormCreator, this way, both plugin can work together. |
if it is not a big modification could you give me it in order to fix it now. |
@satyan01 please try first to workaround by adding in your target the groups which should be added by Behaviors. I think it will work. I think I have to redesign several parts of the plugin now to solve more complex issues, and plan to add tests on the UI of the plugin. |
the group is different according to the requester, anyway, i will wait for your fix. Thank you |
I confirm if I force group in the form it does not appear in the ticket |
Hi I think the fix needs to be in Behaviors, not FormCreator. To remove direct manipulation on tickets I contributed to GLPI 9.1.2 to let it handle arrays of users, groups and suppliers for all actor types (requester, observer, and assigned). Behaviors does not handle arrays for requesters, then it fails with FormCreator. I tried a simple change in FormCreator but this is not sufficient to make Behaviors happy. If I go further, I will simply destroy the work I did a few months ago, and revert to the previous implementation. This old code was very hard to maintain, and is anyway incomaptible with Behaviors due to how it worked. |
The method PluginBehaviorsTicket::BeforeAdd() is called in the process of Ticket::add(), and before the ticket is actually saved in the database. Check the method CommonDBTM::add() which implement the high level actions of adding any item in the database, including tickets of course. |
Behaviors is still on the old forge, which is not quite optimal for my workflow but yes, I'm going to request some dev time to my boss to work on this a little. |
Okay I think I've got it. At
Core 9.2.1 creates its 'vanilla' tickets with a If I complete the test as such: The thing is, I don't know if this is a problem with Behaviors for not checking EDIT: Now that I think about it, unless there's a reason for |
Hi
I said I contributed to GLPI core to handle creation of ticket with several requesters. This contribution is intended to solve way too complex and unmaintainable code in Formcreator. Also, setting multiple observers or assignees was already possible. It makes sense to have same level of features for all actors. The user interface of GLPI still does not allows to set several requesters, this is the reason it does not sends an array of requesters. Therefore, Behaviors is simply not up to date, and it needs a patch. Your investigation seems good, and you're close to a good patch to submit to the community.
I believe I never saw a case when a group ID may be < 0. This needs investigation to determine if this code is still useful or is dead. I suggest you leave it as is to submit a patch which only solve your issue, and investigate (if you want) separately about this case. |
Hi @nbriche did you find time to build a patch for Behaviours plugin ? Or is the bug fixed by someone else ? |
Hi, Sorry; I've asked for the preferred patch submission method (since I have no access to the forge except as read-only, and there's no GitHub repo for Behaviors) but I've had no answer yet. I've used my test modification (manually edited) for about three weeks in production, I've had no issue. |
If I remember correctly, I have access to submit patches or issues. You may send the diff here. I"ll review it, and submit it to the official maintainer. |
Hi, At long last I managed to find enough time to build a patch: issue629_behaviors-v2.0.0.patch.txt It's built (as the name suggests) against 2.0.0. There's been a new release since, but the patch doesn't conflict. |
Hi Thnak you. I submitted the patch here |
_groups_id_requester is always set. If Formcreator doesn't define value as request in the core it's not a Behaviors error. |
Hi OK, I'll update the plugin to always set _groups_id_requester. |
Hello, With :
First requester group is assign on ticket created through formcreator. |
This fix solves issues with Behaiours plugin < 2.0.2 and creates tickets like GLPI does internally fix pluginsGLPI#629
This fix solves issues with Behaiours plugin < 2.0.2 and creates tickets like GLPI does internally fix pluginsGLPI#629
This fix solves issues with Behaiours plugin < 2.0.2 and creates tickets like GLPI does internally fix pluginsGLPI#629
This fix solves issues with Behaiours plugin < 2.0.2 and creates tickets like GLPI does internally fix pluginsGLPI#629
This fix solves issues with Behaiours plugin < 2.0.2 and creates tickets like GLPI does internally fix pluginsGLPI#629
This fix solves issues with Behaiours plugin < 2.0.2 and creates tickets like GLPI does internally fix pluginsGLPI#629
This fix solves issues with Behaiours plugin < 2.0.2 and creates tickets like GLPI does internally fix pluginsGLPI#629
This fix solves issues with Behaiours plugin < 2.0.2 and creates tickets like GLPI does internally fix pluginsGLPI#629
Hello
Thx for this great new version.
Is it possible to do the same thing for ticket title as category
replace title by content of title of incident fields of my form
My group is not created as well
The text was updated successfully, but these errors were encountered: