Skip to content
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

Form Destination - Requester - Allow insert an e-mail from a Anonymous Users #475

Closed
Gambware opened this issue Feb 3, 2017 · 21 comments
Closed
Labels
Projects
Milestone

Comments

@Gambware
Copy link

Gambware commented Feb 3, 2017

In my organization, we allow tickets are open by e-mail from anonymous users. (filtering the email domains in Email Collector Rules)

So, when we created Public forms to allow that the users open their tickets on GLPI, the tickets are opened without a requester and the form doesn't have the option to select Ex. e-mail field on the form to be placed as Requester.

@Gambware
Copy link
Author

Gambware commented Feb 3, 2017

image

@btry
Copy link
Collaborator

btry commented Feb 4, 2017

Hi

Use the field type Actor. In the target ticket, add a requester from an actor question.

The anonymous requester should add his own email adress in the field to appear in requesters.

This feature is available from 2.4.0.

I would like to hear feedbacks about this new feature.

@btry btry added the question label Feb 4, 2017
@Gambware
Copy link
Author

Gambware commented Feb 6, 2017

Hi, Thanks for the answer !!

I changed the field e-mail to Actor on form, but now, when I put the e-mail address on this field he try to search the e-mail and don't find any e-mail even the e-mails that already registered on GLPI Users and the same to e-mails from anonymous users (That aren't registered on GLPI DB). When I move to another field the E-mail (Actor) field back to blank. So I can't insert e-mail address on this field.

image

image

@btry
Copy link
Collaborator

btry commented Feb 6, 2017

Hi

This is simply a misunderstanding about the way this field works. The documentation is not yet up to date with the new version of the plugin.

Searches done by the actor field is done against the name of the users (in other words : their login). The field allows typing email addresses to handle anonymous users. When you type an email address, just ignore the fact the search fails to find any user. This the expected behavior.

When you type a user, you shall either type it until his last char, or choose it in the search results. Asuming you choose to type all chars of the user login (or anonymous user's email), press the Enter key to validate it.

Example: typing glpi
image

After choosiing the user glpi in the drpodown OR fully type it then hit ENTER :
image

The same while typing an email address :
image

When I finished to type the email address, I hit ENTER and the field becomes
image

@Gambware
Copy link
Author

Gambware commented Feb 6, 2017

Ok, I'm trying to Hit Enter and Tab but the field isn't filled. He back to blank
I'm trying on Google Chrome / Mozilla / MS Edge.
All are showing the same behavior.

@Gambware
Copy link
Author

Gambware commented Feb 6, 2017

My GLPI version is 9.1.1

@btry
Copy link
Collaborator

btry commented Feb 6, 2017

If 3 different browsers are imapcrted, I assume this is browser independant. Pick your preferred, and check its developers tools for any JS error while typing something in the field.

Check also :

  • glpi/files/_logs/php-errors.log
  • glpi/files/_logs/sql-errors.log

It should run from GLPI 0.90.x to 9.1.2.

@gotanbl
Copy link

gotanbl commented Feb 6, 2017

Is it possible that the Actor is automatically user who is requester, or user who is logged on system?
Or it could be doable with some other field type?

@btry
Copy link
Collaborator

btry commented Feb 6, 2017

@gotanbl : yes of course ! Just have a look on the default actors when you create a new target ticket
image

There is the form requester in ... the requesters :) . However, it is impossible to determine who is the requester if the form is used anonymously. That's why @Gambware needs the requester fill his own email address.

@Gambware
Copy link
Author

Gambware commented Feb 6, 2017

I checked all logs (php and sql) but nothing related with the form is logging.
Also I notice that the form works perfectly when you are logged on GLPI, but when you open the form without login on glpi the field Actor not work properly he just show "Searching" and dont allow you put any information because when you write a text and hit enter or tab the field backs to blank

@btry
Copy link
Collaborator

btry commented Feb 7, 2017

Hi

Your idea makes sense. I'll investigate in this direction.

@gotanbl
Copy link

gotanbl commented Feb 7, 2017

@btry : I know for that. Another question: Is it possible to use Form requester in Ticket title as Macro like Answers and Question. (##Form requester##).
If form is needed to validate I dont know from which user request is, unless I create question in Form where I ask user for that!

@btry
Copy link
Collaborator

btry commented Feb 7, 2017

@gotanbl : Currently, there is nothing to put the requester in the title of a ticket. You should request this feature by creating a new ticket.

@endlessterror
Copy link

@btry I am requesting support of this feature in ticket #741.

@castorsenior
Copy link

Hello @btry, The same for me as for @Gambware, who writes : "Also I notice that the form works perfectly when you are logged on GLPI, but when you open the form without login on glpi the field Actor not work properly he just show "Searching" and dont allow you put any information because when you write a text and hit enter or tab the field backs to blank".
image
Thanks for your attention and beautiful plugin FormCreator.

@btry
Copy link
Collaborator

btry commented Jan 18, 2019

Hi @castorsenior

This is normal : when you are not authenticated, you are not granted to read anything in the database, and showing available entries requires to read data from users.

The incoming version 2.7.0 will no longer allow to add such fields to anonymous forms. Existing forms will not be modified by the upgrade process. It is up to the form designer to determine how to modify his forms.

@castorsenior
Copy link

Thank you very much @btry for your quick answer :-) :-) :-)
So, I understand that the policy of the developpers is to close the possibility for anonymous users to give their mail. Right ? But what about the issue #741, which is actually in your to do list ? My need is to give possibility to anonymous users to fill a form, to leave their mail adress, and this mail adress to be automatically copied in the field "Requester" of the generated ticket.

@btry
Copy link
Collaborator

btry commented Jan 18, 2019

So, I understand that the policy of the developers is to close the possibility for anonymous users to give their mail. Right ?

This is not the purpose of this change. So I created a fix to allow use of the email field instead. This is not as powerful as actors field because email field allows only one email address. If needed, set several fields. See this patch #1266 . I think that the other issue you pointed may be closed with this patch.

@btry
Copy link
Collaborator

btry commented Jan 18, 2019

image

image

image

@castorsenior
Copy link

Thank you very very much @btry for such detailled explanations. We managed to let it work :-)

@btry btry added this to the 2.7.0 milestone Jan 22, 2019
@btry
Copy link
Collaborator

btry commented Jan 22, 2019

Great, Then I close. The feature is ready for 2.7.0

@btry btry closed this as completed Jan 22, 2019
Plugin automation moved this from To do to Done Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Plugin
  
Done
Development

No branches or pull requests

5 participants