How to get Previous value of record assignment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 09:47 AM
Hi,
Please help me on below issue
SCTASK was Assignments changing as per situation, sometimes to groups, sometimes to Users.
Scenario 1 : Initially it was assigned to a user "David" , From David to it was assigned to Group : "Software", finally From Software group to it was assigned to "Hardware" group ( currently it was assigned to Hardware group).
Now I want to know that , to whom it was assigned Previously either group/user and it's value. (expected result: Software group ).
David-->Software group--->Hardware group .
Scenario 2: Initially it was assigned to :Hardware group---> David user---> software group ( currently it was assigned to Software group)..
Now I want to know that , to whom it was assigned Previously either group/user and it's value. (expected result: David User).
Kindly let me know how to get this solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 10:20 AM
@Supriya25 : You could create metric definitions [metric_definition] similar to what we have on the Incident table for Assignment Group, Assigned to, so the system captures every change on these fields and logs the entries in the [metric_instance] table, which can be easily reportable. Below are the screenshots that will help you.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 10:27 AM - edited 12-20-2023 10:32 AM
Hi Sai,
how about in Scoped Application? do I have to create Metrics there also ?
Even after creating Metrics we can get current field value, but how about we can get one step back Previously on which field we made changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 10:43 AM
@Supriya25 : Yes, you can create metrics for scoped application tables as well. With metrics you can go to any level as it captures all the values from start to end (complete lifecycle) of the ticket. Querying system audit tables is not advisable.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 11:01 AM - edited 12-20-2023 11:12 AM
I understand , here we are looking at Metric table and telling that previously it was assigned to User Or group, clearly system showing .
BUT my concerns
how can we get that previous assignment value in-form of RESULT value from code with Querying Metric table.
Plse Advise .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 11:29 AM
@Supriya25 : Based on the latest entry in this table, as you mentioned, you can determine if this is an "assignment group" or an "assigned to" change. Using the script, we can look for the second entry (using some counter variables) in the table of that type and get the value from the value field.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.