Status update from backend(DB) not reflect on frontend

Moderator: crythias

Locked
GMunjal
Znuny advanced
Posts: 108
Joined: 23 Oct 2013, 09:17
Znuny Version: 3.3.0 beta 2
Real Name: Gaurav Munjal
Company: Nagarro

Status update from backend(DB) not reflect on frontend

Post by GMunjal »

Hi,

we are implemented OTRS, for testing purpose we migrate 1000 ticket in database.

But we need to update all the ticket status to close. so we run the update query in database and update status of all the tickets to Close.

Unfortunately, all the ticket are not visible on OTRS frontend now, can anyone let us know how to get all these tickets visible on OTRS frontend.

Secondly, I create a new ticket in frontend, and update the status of this ticket to close from DB. this single ticket is visible in OTRS frontend buthe status is still shown as OPEN. Can anyone update us why this so behaviour.

Regards,
GMunjal
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Status update from backend(DB) not reflect on frontend

Post by reneeb »

You shouldn't do anything on the DB yourself! You should use the Web GUI or the GenericAgent to close tickets!

For the first issue: Can you show one row from the DB showing the ticket data?

For the second issue: That's probably a caching issue. Most results of DB querys (like TicketGet) is cached. This cache is deleted when the ticket data is updated via the API. You did it on the DB, so the cache is still valid...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
GMunjal
Znuny advanced
Posts: 108
Joined: 23 Oct 2013, 09:17
Znuny Version: 3.3.0 beta 2
Real Name: Gaurav Munjal
Company: Nagarro

Re: Status update from backend(DB) not reflect on frontend

Post by GMunjal »

Thanks for the reply.

But I have to migrate the data, in which I migrate tickets as open state, then for all ticket I have to update the status of all ticket to close.

I can use generic agent, but what is the issue if I am updating the status of all ticket from DB. and all of these tickets are gone invisible from web interface.

Regards,
GMunjal
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Status update from backend(DB) not reflect on frontend

Post by reneeb »

I don't know how you did it and what you exactly changed! Which columns did you update? What are the new values? If that were columns that hold foreign keys, do the appropriate entries exist in the foreign table? You have to provide more details!
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
GMunjal
Znuny advanced
Posts: 108
Joined: 23 Oct 2013, 09:17
Znuny Version: 3.3.0 beta 2
Real Name: Gaurav Munjal
Company: Nagarro

Re: Status update from backend(DB) not reflect on frontend

Post by GMunjal »

yes ,I checked all the values.. I update only the ticket.ticket_status_id to 2--means closed successful status.
GMunjal
Znuny advanced
Posts: 108
Joined: 23 Oct 2013, 09:17
Znuny Version: 3.3.0 beta 2
Real Name: Gaurav Munjal
Company: Nagarro

Re: Status update from backend(DB) not reflect on frontend

Post by GMunjal »

For the same like this issue , I tries the below :

I create a dynamic fields of dropdown type in OTRS with values 1,2 & 3. This dynamic field dropdown is visible on all the OTRS forms - Ticket create, ticket zoom etc.

So then I insert value 2 for all the tickets which are present in DB.

Then I check on web interface on ticket zoom, still it shows value 1(set as default value of dropdown) for this field. No changes shown to the value.
Then I update the value from web interface to 3, only than the value updated on web interface and in database as 3.

So overall, when I update the value from data base, no changes reflect on web interface....but when I change the value from web interface then the values reflect on web interface as well as in database.

Can any one help on this , why this way happen and what is the resolution of this to update the values from backend.

Regards,
GMunjal
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Status update from backend(DB) not reflect on frontend

Post by reneeb »

Caching. DId you run otrs.DeleteCache.pl? You shouldn't change values in the database!
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
GMunjal
Znuny advanced
Posts: 108
Joined: 23 Oct 2013, 09:17
Znuny Version: 3.3.0 beta 2
Real Name: Gaurav Munjal
Company: Nagarro

Re: Status update from backend(DB) not reflect on frontend

Post by GMunjal »

Thanks for the resolution, issue resolved

Thanks
Gaurav Munjal
Locked