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
N°6863 - Allow mail inbox administrator to choose log attribute in which updates will be added #8
base: master
Are you sure you want to change the base?
Conversation
…ich updates will be added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also elaborate what the exact issue is with AttributeClassAttCodeSet
? Doesn't it fill in the default value in the database on creation of the column?
// Determine which field to update | ||
$sAttCode = 'public_log'; | ||
$sAttCode = $this->Get('ticket_updates_log_attcode'); | ||
$aAttCodes = MetaModel::GetModuleSetting('itop-standard-email-synchro', 'ticket_log', array('UserRequest' => 'public_log', 'Incident' => 'public_log')); | ||
if (array_key_exists(get_class($oTicket), $aAttCodes)) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$sAttCode
will get overwritten by this default module setting..
Should this setting be obsoleted and ignored maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I'll fix it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just changed the conf. param. default value to an empty array; but actually the whole conf. param. should be obsoleted you are right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about existing/upgrading users? They will still have the setting from previous install. Also new users will have this setting as it is still present in module file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why obsoleting the param. and removing the line from the code is the best way IMHO.
For existing users, we should check the existing conf. param. and apply the corresponding value to existing mail inboxes. I missed that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could be an action during setup (after database creation) for example..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally
I wasn't able to prefill the attribute with a default value when creating a new mail inbox, even with |
You found a bug? 😁 |
Let's call it a known limitation 😅😭 |
Objective
Allow mail inbox administrator to choose log attribute in which updates will be added
Use case
The idea is to avoid the end-user to be aware of the provider updates
Proposed solution
AttributeString
instead of an ÀttributeClassAttCodeSet` to avoid data migration and as default value is not handled well, but this can be subject to discussion.Appendices
XML snippet for
AttributeClassAttCodeSet
: