Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement a counter

SOLVED
Go to solution
Highlighted
Jan Gunnar Helg
Senior Member

How to implement a counter

I want to implement a rollback counter for use with changes.

If the status is changed from "Released to Production" back to "Build and test" I want the numeric Rollback counter field to be updated in increments of one.

This so we can see how many times a change might have been rollbacked.

How do I implement this? I am using HPOVSD 4.5 SP 17
2 REPLIES
George M. Meneg
Honored Contributor
Solution

Re: How to implement a counter

Hello Jan,

If this number is unique per change, it's easy.
If this number is global it can't be done without an external tool.

Enable a custom field of number type. Name it for example "rollback counter". Modify the change templates to set "rollback counter" to 0 on change creation, or create a db rule when a new change is created to set rollback counter to 0. This must be done otherwise the "Add" function will not work.

Enable a custom text field to hold the value of the previous status, name it for example "prev status".

Create a UI rule when item is opened to set prev status to Status.

Then create a db rule that does the following: When item is changed and previous status=Released to Production and Status(*)=Build and Test to update data and set rollback counter to add 1.0 to rollback counter.

(*) means that you must check "Evaluate this rule when this field has been changed".

PS, from what I see you have not assigned any points to any of the six answers to your question. Assigning points to people who try to help you by answering your question is strongly encouraged. Take a look at http://forums1.itrc.hp.com/service/forums/helptips.do?#28
menes fhtagn
Jan Gunnar Helg
Senior Member

Re: How to implement a counter

Thank you, Ill test it out.

Sorry about not granting points to threads, I'll do that now
//Add this to "OnDomLoad" event