I'd like to set a condition for a fast-track script based on the value of a custom field. I used to have this working in Scriptrunner (Server) but cannot find an example of how to work it using Scriptrunner (Cloud).
My successful old implementation was:
cfValues['Change Category']?.value == 'Fast Track'All research done so far indicates I need to hard code the custom field ID to be something like (?!):
issueInput.fields.customfield_10107 == [value: '{{Fast Track}}'] as Map
where 10107 is the custom field ID. Which is not ideal as I'd like to refer to the name instead.
Any ideas?
@jeff singler is it the complete script? I guess you need to process the results properly, something like
sql.rows('SELECT [VEHICLEID] , [CURRODOM] FROM [FUELMASTER].[dbo].[VehicleCK] where [VEHICLEID] like '%{issue.summary}').each { row -> log.error(row.CURRODOM) }I just pust logging function to test what value is logged. Can you try this approach?
Thank you for your help, I ended up going a completely different route to achieve this but I will need sometime in the far future to do writes to a DB with Scriptrunner so I will be back at this at some point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.