Jump to content

Activities not being "Cancelled" when a Request is "Cancelled"


samwoo

Recommended Posts

Hello,

I went into the My Activities area and amended by default View to hide Tasks that are Closed or Cancelled. Upon making the change I noticed that there were lots of Outstanding tasks on the list that I wasn't aware of.

Going into the call related to the Tasks I can see that the call is Cancelled... but the Tasks still remain open on the right hand side.

I then attempt to delete them... but I cannot (throws out an error). So I manually complete them one-by-one. Going back to the My Activities area these Tasks have now disappeared from the list.

Aren't Tasks supposed to be cancelled when a Request is? What can we do to resolve this?

To check with you (Hornbill Guru's) first - I was thinking of an Update SQL script using similar to select criteria as below... but I do not know what field in the h_sys_tasks table relates to whether a Task is cancelled or not (I'm guessing it's h_state but the numbers are not very clear to what they are). I am also not sure of the implications of running this update script hence the reason I am checking on here.

SELECT 	* 
FROM 	h_sys_tasks 
WHERE 	h_obj_ref_urn in
(
    	SELECT 		'urn:sys:entity:com.hornbill.servicemanager:Requests:' || h_pk_reference
    	FROM    	h_itsm_requests
    	WHERE   	h_Status = 'status.cancelled'
)

Could someone look into this and advise please?

Thanks,

Samuel

Link to comment
Share on other sites

Hi Samuel,

With regards to the tasks not being cancelled when cancelling a request, there is a Service Manager application setting that enables or disables the cancelling of related tasks which is:

webapp.view.ITSM.serviceDesk.requests.cancel.cancelRelatedActivities

So you may want to check as it could be as simple as not having this option turned on.

As for cancelling the existing tasks, yes the h_state field in h_sys_tasks relates to the task status and for cancelled status this value should be set 10.

Hope that helps,

Kind Regards,

Dave.

Link to comment
Share on other sites

Hi @David Hall,

Thanks for the response. I have double checked the setting and it seems to be turned on already. I have turned it off then back on again.

Running the following brings back a count of 29502 tasks where the Request is "Cancelled" but the Task is not.
(is the SQL incorrect by any chance?)

SELECT 	count(*)  as Count
FROM 	h_sys_tasks 
WHERE 	h_obj_ref_urn in
(
    	SELECT 		'urn:sys:entity:com.hornbill.servicemanager:Requests:' || h_pk_reference
    	FROM    	h_itsm_requests
    	WHERE   	h_Status = 'status.cancelled'
)
and     h_state <> 10

 

If I were to run the following - will there be any implications / other tables I would need to look at/be aware of?

UPDATE  h_sys_tasks
SET     h_state = 10
WHERE 	h_obj_ref_urn in
(
    	SELECT 		'urn:sys:entity:com.hornbill.servicemanager:Requests:' || h_pk_reference
    	FROM    	h_itsm_requests
    	WHERE   	h_Status = 'status.cancelled'
)
and     h_state <> 10

Thanks,

Samuel

ps. I think we need an area / library of SQL scripts that can be run that are deemed safe to use... whether they are query scripts or update scripts.

Link to comment
Share on other sites

Hi Samuel,

Thanks for checking the setting, we have logged a problem to investigate if there are issues with that setting.

As for the SQL update you are suggesting, I'm afraid I personally have no access to your instance data so I couldn't advise whether the selection was accurate or not.  In general all updates should be made via the API calls to maintain data integrity to avoid missing any possible related data so I would not want to recommend a manual SQL update.

I appreciate that you may have a large volume of tasks to cancel, if I can find a better way to do that I will post back.

Regards,

Dave.

 

Link to comment
Share on other sites

  • 1 month later...
  • 9 months later...
On ‎17‎/‎12‎/‎2016 at 2:00 AM, James Ainsworth said:

Hi @samwoo

I just wanted to check if you are still experiencing situations when activities associated to a request are not being cancelled when the request is cancelled?

Regards,

James

Hi @James Ainsworth,

I am not sure how I missed this...

I believe we are still having problems with this issue.

I have just done a count of all requests that are resolved / closed where the activity status is not completed or cancelled and it's returning 24,611 activities with closed or resolved requests (i haven't excluded expired ones, I don't know what the code is for that).
 

Another issue
How can we clear the number of activities showing up on the Home Icon? The Service Desk are refusing to look at their activities due to the shear volume of them (our fault really for creating too many of them in the early days).

We were wondering if we can remove the count of activities from appearing in the Home Icon as we all mostly use the buttons on the right side to see any activities. We are happy to retain the count of unread Workspaces posts.
59bfbfe3cb4bb_TechSupportHomeicon.png.27b4b856ce3663b7d8c76ded5d651382.png

Thanks,

Samuel

Link to comment
Share on other sites

3 hours ago, samwoo said:

I have just done a count of all requests that are resolved / closed where the activity status is not completed or cancelled and it's returning 24,611 activities with closed or resolved requests (i haven't excluded expired ones, I don't know what the code is for that).

Hi @Samwoo

The original issue was just with Cancelled requests.  Request can be resolved or closed with active tasks.  There is a setting to prevent requests from being resolved when there are active tasks.

Regards, 

James

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...