Scrip to check who updated a CustomField

I have scrips that will check the value of a custom field and perform actions based on it.

But what I can’t seem to figure out is how to show who made the custom field change.

Specifically, I’m trying to compare who updated 2 custom fields. I have a case where I have a group of users allowed to change these 2 fields, but the same user isn’t allowed to change both. So I need to compare who changed the 2 fields, and if they’re the same user, perform an action (ie: set ticket stalled or email adminCC’s or whatever).

I’m pretty new to object oriented programming (especially under Perl), but it looks like I should be able to check “LastUpdatedBy”; I’m just not sure how.

Thanks!

I have scrips that will check the value of a custom field and perform actions based on it.

But what I can’t seem to figure out is how to show who made the custom field change.

Specifically, I’m trying to compare who updated 2 custom fields. I have a case where I have a
group of users allowed to change these 2 fields, but the same user isn’t allowed to change
both. So I need to compare who changed the 2 fields, and if they’re the same user, perform an
action (ie: set ticket stalled or email adminCC’s or whatever).

I’m pretty new to object oriented programming (especially under Perl), but it looks like I
should be able to check “LastUpdatedBy”; I’m just not sure how.

I suspect you want the Transaction object’s CreatorObj which will be
the user who made the change. Transactions don’t tend to be updated,
so LastUpdatedByObj should be the same as CreatorObj

-kevin

I have scrips that will check the value of a custom field and perform actions based on it.

But what I can’t seem to figure out is how to show who made the custom field change.

Specifically, I’m trying to compare who updated 2 custom fields. I have a case where I have a
group of users allowed to change these 2 fields, but the same user isn’t allowed to change
both. So I need to compare who changed the 2 fields, and if they’re the same user, perform an
action (ie: set ticket stalled or email adminCC’s or whatever).

I’m pretty new to object oriented programming (especially under Perl), but it looks like I
should be able to check “LastUpdatedBy”; I’m just not sure how.

I suspect you want the Transaction object’s CreatorObj which will be the user who made the change. Transactions don’t tend to be updated, so LastUpdatedByObj should be the same as CreatorObj

-kevin

I’m not sure that would work. The case could be like this:
User A selects a value for Field1
User B selects a value for Field2
User A reselects a value for Field2

If I understand what you’ve said, then my test would “pass” because the values were initially chosen (created) by different users. But I really want the above to “fail”.

Or is that CreatorObj new every time the transaction happens?

-Brent

I have scrips that will check the value of a custom field and perform actions based on it.

But what I can’t seem to figure out is how to show who made the custom field change.

Specifically, I’m trying to compare who updated 2 custom fields. I have a case where I have a
group of users allowed to change these 2 fields, but the same user isn’t allowed to change
both. So I need to compare who changed the 2 fields, and if they’re the same user, perform an
action (ie: set ticket stalled or email adminCC’s or whatever).

I’m pretty new to object oriented programming (especially under Perl), but it looks like I
should be able to check “LastUpdatedBy”; I’m just not sure how.

I suspect you want the Transaction object’s CreatorObj which will be the user who made the change. Transactions don’t tend to be updated, so LastUpdatedByObj should be the same as CreatorObj

-kevin

I’m not sure that would work. The case could be like this:
User A selects a value for Field1
User B selects a value for Field2
User A reselects a value for Field2

If I understand what you’ve said, then my test would “pass” because the values were initially chosen (created) by different users. But I really want the above to “fail”.

Or is that CreatorObj new every time the transaction happens?

Each of those is a single transaction.

Go create a test ticket with those cases and look at the transaction history for it.

-kevin