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

Bug whit "Comment" injection #438

Open
2 tasks done
TxX8N8LN opened this issue Nov 14, 2024 · 1 comment
Open
2 tasks done

Bug whit "Comment" injection #438

TxX8N8LN opened this issue Nov 14, 2024 · 1 comment

Comments

@TxX8N8LN
Copy link

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

GLPI Version

10.0.17

Plugin version

2.14.0

Bug description

Same bug in this post #280

I have tested with GLPI 10.0.17 and plugin 2.14.0

When I inject text into the "Comment" field, there is no update, but the text is added instead.

Example : Comment in file is "In the bedroom", glpi is "in the saloon"

After the first injection, the comment field shows:
"in the saloon
In the bedroom"

After the second injection, the comment field shows:
"in the saloon
In the bedroom
In the bedroom"

What I need in the comment field is : "In the bedroom"

This bug occurs for all objects with a comment field.

To fix this for computers, I modified the following in

./plugins/datainjection/inc/computerinjection.class.php

        $options['displaytype']   = ["dropdown"       => [3, 4, 23, 31, 32, 33, 40,
            41, 42, 45, 46, 49, 71
        ],
            "user"           => [24, 70]
            /**"multiline_text" => [16, 90]**/
        ];

Thx

Relevant log output

No response

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

No response

@stonebuzz
Copy link
Contributor

Hi @TxX8N8LN

This is not a bug but the intended behavior for fields of type multiline_text (liek comment).
The plugin appends content instead of replacing it.

I cannot explain the original need for such behavior (it dates back 14 years: link to the commit).

Could you submit a pull request ?

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants