Hi,
I'm testing the archive ticket feature on OTRS 3.0.5 but I'm not able to search for archived tichet once they are archived, and I am not able to restore them from archive.
These the steps I followed:
1. Enable the archive feature (once for all) on SysConfig by setting Ticket::ArchiveSystem to Yes
2. defined the GenericAgent job "Archive closed ticket"
- Job Name: Archive closed tickets
- Ticket filter - State: closed succesfull + closed unsuccesfull (both are highlited on the job definition window)
- Ticket filter - Archive search option: Search in all tickets
- Ticket action - Archive selected tickets: archive tickets
as soon as I save my job I see 4 impacted tickets ... I press Run job and I assume they are archived.
3. searching for the ticket I filter:
State: closed succesfull + closed unsuccesfull
Archive Search
... No results (1st issue)
Indeed the tickets have been archived since I cannot find any closed ticket in my views
4. Trying to restore them I apply the restore job:
- Job Name: Restore closed archived tickets
- Ticket filter - State: closed succesfull + closed unsuccesfull (both are highlited on the job definition window)
- Ticket filter - Archive search option: Search in archived tickets only
- Ticket action - Archive selected tickets: restore tickets from archive
as soon as I save my job I see 4 impacted tickets ... I press Run job and I assume they are restored... but
5. searching for the ticket I filter:
State: closed succesfull + closed unsuccesfull
... No results
6. searching for the ticket I filter:
State: closed succesfull + closed unsuccesfull
Archive Search
... No results again...
May you please help me troubleshooting this issue?
thank you in advance
Giulio
Unable to restore Archived Ticket
Moderator: crythias
-
- Znuny wizard
- Posts: 392
- Joined: 30 Dec 2010, 14:35
- Znuny Version: 6.0.x and 5.0.x
- Real Name: Giulio Soleni
- Company: IKS srl
Unable to restore Archived Ticket
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
ITSM and FAQ modules installed.
Re: Unable to restore Archived Ticket
please delete your cache and try step 5 again
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny wizard
- Posts: 392
- Joined: 30 Dec 2010, 14:35
- Znuny Version: 6.0.x and 5.0.x
- Real Name: Giulio Soleni
- Company: IKS srl
Re: Unable to restore Archived Ticket
Thank you jojo, but even after a /opt/otrs/bin/otrs.DeleteCache.pl situation did not changejojo wrote:please delete your cache and try step 5 again

... have to say that my search was not correctly set, due to a misunderstanding in the field selection.
Now I am able to correctly search into archived and active tickets since my step 3 has become:
3. searching for the ticket I filter:
State: closed succesfull + closed unsuccesfull
Archive Search option: Search in archived tickets only
(before I simply did not checked any option for the field Archive Search...)
I performed some check directly on the db:
SELECT archive_flag,ticket_state_id,tn FROM ticket where ticket_state_id in (2,3)
1 2 201101251000[...]
1 2 201101251000[...]
1 2 201101251000[...]
1 2 201101251000[...]
So, I can still see that the archive flag is set for all my closed (state = 2) tickets even after I run the restore job...
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
ITSM and FAQ modules installed.
Re: Unable to restore Archived Ticket
ok, perhaps you could just open a bug...
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny wizard
- Posts: 392
- Joined: 30 Dec 2010, 14:35
- Znuny Version: 6.0.x and 5.0.x
- Real Name: Giulio Soleni
- Company: IKS srl
Re: Unable to restore Archived Ticket
ok ... I have requested a bugzilla account right now...
In the meanwhile I would like to check in the perl module for the GenericAgent.pm where it allows for the restore of the archived tickets.
I was able to find this in /opt/otrs/Kernel/System/GenericAgent.pm
But I cannot find a corresponding piece of code for the restore ... maybe this is actually the bug 
In the meanwhile I would like to check in the perl module for the GenericAgent.pm where it allows for the restore of the archived tickets.
I was able to find this in /opt/otrs/Kernel/System/GenericAgent.pm
Code: Select all
# set new archive flag
if (
$Param{Config}->{New}->{ArchiveFlag}
&& $Self->{ConfigObject}->Get('Ticket::ArchiveSystem')
)
{
if ( $Self->{NoticeSTDOUT} ) {
print
" - set archive flag of Ticket $Ticket to '$Param{Config}->{New}->{ArchiveFlag}'\n";
}
$Self->{TicketObject}->TicketArchiveFlagSet(
TicketID => $Param{TicketID},
UserID => $Param{UserID},
ArchiveFlag => $Param{Config}->{New}->{ArchiveFlag},
);
}

OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
ITSM and FAQ modules installed.