You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm trying to create a "Clones an issue, and links" listener with condition based on 'Customer Request Type', but it doesn't work.
The condition script is:
def cf = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Customer Request Type")
def requestType = issue.getCustomFieldValue(cf)
if(requestType.toString() == "sr/ad0f59b4-6224-4060-8d66-4e714a8e4a20")
Can anyone helps please.
Hi @Guy Ayika ,
Looking at the examples I would use something like :
log.error("Customer Request Type : " + cfValues['Customer Request Type'])
cfValues['Customer Request Type'] == 'sr/ad0f59b4-6224-4060-8d66-4e714a8e4a20'
I added the log of the field value in case that does not work so you can check it.
Thx for your prompt reply.
The listener seems to react correctly (no link issue created) when create issue with another Customer Request type, but with the correct one it's not creating anything also. I get this:
Time (on server): Mon Feb 24 2020 20:58:04 GMT+0100 (Central European Standard Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2020-02-24 19:58:04,046 ERROR [utils.ConditionUtils]: Customer Request Type : sr/ad0f59b4-6224-4060-8d66-4e714a8e4a20
I have no clue what that means.