mantisbt-plugins / TelegramBot

15 stars 13 forks source link

error creating defect in telegram_message_bug_added #33

Open totojo85 opened 4 years ago

totojo85 commented 4 years ago

I have integrated the testlink, mantis and the telegram bot.

When trying to create a defect in the testlink, it shows me an error in the log, indicating the following:

[Wed Sep 30 06:19:25.123920 2020] [:error] [pid 19504] [client 172.31.12.165:10648] [mantisconnect.php] Error Type: SYSTEM NOTICE,\nError Description: Undefined variable: p_bug_id\nStack Trace:\nUnknownFile L? telegram_message_bug_added('EVENT_REPORT_BUG', ( [attachment_count] => NULL, [bugnotes_count] => NULL ), 16)\nevent_api.php L206 call_user_func_array( { [0] => ( [name] => 'TelegramBot', [description] => 'Adds the user interaction function to the MantisBT via the Telegram messenger.', [page] => 'config_page', [version] => '1.5.0', [requires] => { ['MantisCore'] => '2.14.0' }, [uses] => NULL, [author] => 'Grigoriy Ermolaev', [contact] => 'igflocal@gmail.com', [url] => 'http://github.com/mantisbt-plugins/TelegramBot', [basename] => 'TelegramBot' ), [1] => 'telegram_message_bug_added' }, { [0] => 'EVENT_REPORT_BUG', [1] => ( [attachment_count] => NULL, [bugnotes_count] => NULL ), [2] => 16 })\nevent_api.php L232 event_callback('EVENT_REPORT_BUG', 'telegram_message_bug_added', 'TelegramBot', { [0] => ( [attachment_count] => NULL, [bugnotes_count] => NULL ), [1] => 16 })\nevent_api.php L164 event_type_execute('EVENT_REPORT_BUG', { ['TelegramBot'] => { [0] => 'telegram_message_bug_added' } }, { [0] => ( [attachment_count] => NULL, [bugnotes_count] => NULL ), [1] => 16 })\nIssueAddCommand.php L462 event_signal('EVENT_REPORT_BUG', { [0] => ( [attachment_count] => NULL, [bugnotes_count] => NULL ), [1] => 16 })\nCommand.php L137 process()\nmc_issue_api.php L946 execute()\nUnknownFile L? mc_issue_add('administrator', 'root', ( [project] => ( [id] => 1 ), [category] => 'General', [reporter] => ( [name] => 'admin' ), [summary] => '/TL20/Prueba/BT20-1:Prueba bot - Ejecutado EL (FORMATO ISO): 2020-09-29 07:13:46', [description] => 'fg' ))\nmantisconnect.php L89 handle()\n

[Wed Sep 30 06:19:25.125653 2020] [:error] [pid 20427] [client 172.31.26.20:60132] PHP Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Error Type: SYSTEM NOTICE,\nError Description: Undefined variable: p_bug_id in /var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php:461\nStack trace:\n#0 /var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php(461): SoapClient->__call('mc_issue_add', Array)\n#1 /var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php(461): SoapClient->mc_issue_add('administrator', 'root', Array)\n#2 /var/www/html/TL201/lib/functions/exec.inc.php(703): mantissoapInterface->addIssue('/TL20/Prueba/BT...', 'fg', Object(stdClass))\n#3 /var/www/html/TL201/lib/execute/bugAdd.php(38): addIssue(Object(database), Object(stdClass), Object(mantissoapInterface), Array)\n#4 {main}\n thrown in /var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php on line 461, referer: https://www.zmagadx.com/TL201/lib/execute/bugAdd.php?user_action=create&tcversion_id=5&tproject_id=1&tplan_id=2&exec_id=2&tcstep_id=0

error.log testlink.log access.log

brlumen commented 3 years ago

Hello!

Please send me your: Mantisbt version, database version, php version, telegrambot version.

ср, 30 сент. 2020 г., 13:59 totojo85 notifications@github.com:

I have integrated the testlink, mantis and the telegram bot.

When trying to create a defect in the testlink, it shows me an error in the log, indicating the following:

[Wed Sep 30 06:19:25.123920 2020] [:error] [pid 19504] [client 172.31.12.165:10648] [mantisconnect.php] Error Type: SYSTEM NOTICE,\nError Description: Undefined variable: p_bug_id\nStack Trace:\nUnknownFile L? telegram_message_bug_added('EVENT_REPORT_BUG', ( [attachment_count] => NULL, [bugnotes_count] => NULL ), 16)\nevent_api.php L206 call_user_func_array( { [0] => ( [name] => 'TelegramBot', [description] => 'Adds the user interaction function to the MantisBT via the Telegram messenger.', [page] => 'config_page', [version] => '1.5.0', [requires] => { ['MantisCore'] => '2.14.0' }, [uses] => NULL, [author] => 'Grigoriy Ermolaev', [contact] => 'igflocal@gmail.com', [url] => ' http://github.com/mantisbt-plugins/TelegramBot https://github.com/mantisbt-plugins/TelegramBot', [basename] => 'TelegramBot' ), [1] => 'telegram_message_bug_added' }, { [0] => 'EVENT_REPORT_BUG', [1] => ( [attachment_count] => NULL, [bugnotes_count] => NULL ), [2] => 16 })\nevent_api.php L232 event_callback('EVENT_REPORT_BUG', 'telegram_message_bug_added', 'TelegramBot', { [0] => ( [attachment_count] => NULL, [bugnotes_count] => NULL ), [1] => 16 })\nevent_api.php L164 event_type_execute('EVENT_REPORT_BUG', { ['TelegramBot'] => { [0] => 'telegram_message_bug_added' } }, { [0] => ( [attachment_count] => NULL, [bugnotes_count] => NULL ), [1] => 16 })\nIssueAddCommand.php L462 event_signal('EVENT_REPORT_BUG', { [0] => ( [attachment_count] => NULL, [bugnotes_count] => NULL ), [1] => 16 })\nCommand.php L137 process()\nmc_issue_api.php L946 execute()\nUnknownFile L? mc_issue_add('administrator', 'root', ( [project] => ( [id] => 1 ), [category] => 'General', [reporter] => ( [name] => 'admin' ), [summary] => '/TL20/Prueba/BT20-1:Prueba bot - Ejecutado EL (FORMATO ISO): 2020-09-29 07:13:46', [description] => 'fg' ))\nmantisconnect.php L89 handle()\n

[Wed Sep 30 06:19:25.125653 2020] [:error] [pid 20427] [client 172.31.26.20:60132] PHP Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Error Type: SYSTEM NOTICE,\nError Description: Undefined variable: p_bug_id in /var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php:461\nStack trace:\n#0 /var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php(461): SoapClient->__call('mc_issue_add', Array)\n#1 /var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php(461): SoapClient->mc_issue_add('administrator', 'root', Array)\n#2 /var/www/html/TL201/lib/functions/exec.inc.php(703): mantissoapInterface->addIssue('/TL20/Prueba/BT...', 'fg', Object(stdClass))\n#3 /var/www/html/TL201/lib/execute/bugAdd.php(38): addIssue(Object(database), Object(stdClass), Object(mantissoapInterface), Array)\n#4 {main}\n thrown in /var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php on line 461, referer: https://www.zmagadx.com/TL201/lib/execute/bugAdd.php?user_action=create&tcversion_id=5&tproject_id=1&tplan_id=2&exec_id=2&tcstep_id=0

error.log https://github.com/mantisbt-plugins/TelegramBot/files/5303614/error.log testlink.log https://github.com/mantisbt-plugins/TelegramBot/files/5303615/testlink.log access.log https://github.com/mantisbt-plugins/TelegramBot/files/5303617/access.log

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mantisbt-plugins/TelegramBot/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGGRAVQ4DBDTHIDTW4XKXY3SILJM5ANCNFSM4R6WOWIQ .

totojo85 commented 3 years ago

Hello!

The versions are as follows:

Php: 5.6.40 mysql: 5.7.31 Mantisbt : 2.24.3 https://www.mantisbt.org/ Telegrambot: 1.5.0 https://github.com/mantisbt-plugins/TelegramBot

brlumen commented 3 years ago

@totojo85, Launched the plugin on a similar configuration, ran all possible tests. I was unable to reproduce the error you mentioned.

Could you send a detailed list of your actions leading to this error?

brlumen commented 3 years ago

/var/www/html/TL201/lib/issuetrackerintegration/mantissoapInterface.class.php

And what is this file? It is not included in the standard mantisbt distribution.

taixcms commented 3 years ago

when executing the method mc_issue_add via api /api/soap/mantisconnect.php?wsdl

$result = $mantis->mc_issue_add('soapclientlogin', 'soapclientpassword', $t_issue); I get an answer

<br/> <b>Fatal error</b>: Uncaught SoapFault exception: [SOAP-ENV:Server] Error Type: SYSTEM NOTICE, Error Description: Undefined variable: p_bug_id in addSupportIssue.php:27 Stack trace: #0 addSupportIssue.php(27): SoapClient-&gt;__call('mc_issue_add', Array) #1 libs.class.php(17): require_once('...') #2 index.php(675): include_once('...') #3 {main} thrown in <b>addSupportIssue.php</b> on line <b>27</b><br/>

please explain why p_bug_id Undefined unless a similar parameter is used in this request inquiry: $result = $mantis->mc_version('soapclientlogin', 'soapclientpassword',); works correctly. Screenshot_4