Bug #139

Not clearing all tables

Added by INTRACTO - Support about 12 years ago. Updated over 11 years ago.

Status:Closed Start date:12 Jan 2013
Priority:Normal Due date:
Assignee:Amarjeet Kaur % Done:

0%

Category:-
Target version:-

Description

I deleted all tickets linked to jira (also deleted them from Trash) in the table swjiraissues the rows are not deleted.....

staff_ticket_delete.hook (1.4 kB) Amarjeet Kaur, 01/18/2013 04:42 am

class.Controller_Manage.php (37.6 kB) INTRACTO - Support, 01/23/2013 07:13 am

History

Updated by Amarjeet Kaur about 12 years ago

Hello,

Please do following changes to resolve above issue:

  1. Add attached ‘staff_ticket_delete.hook’ file in ‘helpdesk_installation_folder/__apps/jira/hooks’.
  2. In class.Controller_Manage.php (Under ‘helpdesk_installation_folder/__apps/tickets/staff/')

-> find following functions
static public function DeleteList($_ticketIDList, $_byPassCSRF = false)

and
public function EmptyTrash()

-> Add following code in both above functions to make the hook working:

// Begin Hook: staff_ticket_delete
unset($_hookCode);
($_hookCode = SWIFT_Hook::Execute('staff_ticket_delete')) ? eval($_hookCode) : false;
// End Hook

->Just above the line in both the functions:

SWIFT_Ticket::DeleteList($_ticketIDList);

Please let me know, if you still face any issue with it.

Thank you,
Amarjeet Kaur

Updated by INTRACTO - Support about 12 years ago

Hi,

This seems not to be copletely fixed.
I moved my ticket connected to Jira to trash and emptied trash.
I got error:

404 : HTTP/1.1 404 Not Found Connection: Keep-Alive Transfer-Encoding: chunked Date: Tue, 22 Jan 2013 09:48:54 GMT Content-Type: application/json;charset=UTF-8 Server: Apache-Coyote/1.1 X-AREQUESTID: 648x706964x1 X-Seraph-LoginReason: OK X-ASESSIONID: vbgph3 X-AUSERNAME: admin Cache-Control: no-cache, no-store, no-transform Set-Cookie: JSESSIONID=183AA3F29CA46295F91D9BA1278929BA; Path=/; HttpOnly Set-Cookie: atlassian.xsrf.token=B6U3-QS7T-ML8C-Y3P3|9af6bafa72c22fa4a7069a9211a8df950ece12cd|lin; Path=/ {"errorMessages":[],"errors":{"globalId":"Remote issue link with globalId 'system=http://support.intracto.com/staff/index.php?/Tickets/Ticket/View/39673' does not exist in issue with id '14828'."}}

The ticket was deleted from trash (not all so I had to Empty trash again) to get all tickets deleted that were in trash.

I must say that before I moved the ticket to trahs it was merged with to other tickets. The ticket linked to Jira was the parrent ticket to not break the link.

I still have one record in the table swjiraissues with this ticketID.

Regards,
Jo

Updated by Amarjeet Kaur about 12 years ago

Hi Jo,

Please make sure that you have added the hook code in both functions Just above the line

SWIFT_Ticket::DeleteList($_ticketIDList);

Your error indicates that the ticket is already deleted.
Please cross check your code placement and kindly let me know, if problem still exists.

Thank you,
Amarjeet Kaur

Updated by INTRACTO - Support about 12 years ago

Hereby our changed file. You can take a look at it and correct us if I'm wrong.

Regards,
Jo

Updated by Amarjeet Kaur about 12 years ago

Hi Jo,

Kindly do following changes to resolve this issue:

In class.SWIFT_JIRABridge.php (under __apps/jira/library/JIRA)

Under:

public function CreateIssue($_data)

find:


if (!$_SWIFT->Settings->Get('bj_jiraissuelinking') || $this->PostRemoteLink($_data['key'], $_ticketURL, $_title, $_ticketSummary)) {

and replace it with:


if ($_SWIFT->Settings->Get('bj_jiraissuelinking') && $this->PostRemoteLink($_data['key'], $_ticketURL, $_title, $_ticketSummary)) {

Please let us know, if this issue still persists at your end.

Thank you,
Amarjeet Kaur

Updated by Amarjeet Kaur over 11 years ago

  • Status changed from New to Closed

Also available in: Atom PDF