Recode IP Address and Device Name to issue
On issue creation, it would be very helpful if the IP Address and Device Name of the client can be added to the issue.
Updated by Toshi MARUYAMA about 6 years ago
- Subject changed from IP Address and Device Name to Recode IP Address and Device Name to issue
- Category changed from Custom fields to Issues
- Priority changed from Urgent to Normal
Updated by Bitaseme M about 6 years ago
I've played around with this and found out a few things:
controller_issues_new_before_save hook seems like the best fit if this were to be a plugin however the methods used to get the IP Address and Device Name in Ruby are not available in a
Redmine::Hook::ViewListener class. These methods are only available in a controller.
That being said, custom field values can still be set here. If the methods could somehow become available in the
Redmine::Hook::ViewListener class then this issue would be resolved. As it stands, one would have to get the IP Address and Device Name in their plugin controller, store these values in variables, and then somehow re-direct to the regular issue creation which calls the hook that actually sets the fields.
I don't claim to be an expert in Redmine, Rails, or Ruby. So if someone sees a better solution don't hesitate to comment.