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
Next: Root
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
Hello,
I am exploring a way to read from an external DB, locate a value that pertains to a name we store in the summary field. For instance my MS SQL query and groovy would look close to this:
DatabaseUtil.withSql('fuel') { sql ->
sql.rows('SELECT [VEHICLEID] , [CURRODOM] FROM [FUELMASTER].[dbo].[VehicleCK] where [VEHICLEID] like '%{issue.summary}')
}
Then I would like to write the CURRODOM value to a custom field.
I can get data returned in general that looks like this (if I remove the where clause):
[[VEHICLEID:000000G1, CURRODOM:135874], [VEHICLEID:000000G2, CURRODOM:064523], [VEHICLEID:000000H9, CURRODOM:679841]......
I would like the CURRODOM number formatted to only be displayed as a number like 135874 in the custom field.
How can this be accomplished?