Hello there,
I'm trying to send a web request with custom data which includes all the custom fields within an issue. My custom fields change between issues depending on type of issue (specified as a label). It's obviously possible to get the custom fields by name and use if-else depending on type, but this isn't particularly efficient.
Within the Issue Data option for the webhook body it provides fields data so this feels like it should be possible.
What would be perfect is if there were something like {{triggerIssue.fields}} (or equivalent).
Thanks.
Hi @Tacictus Anon -- Welcome to the Atlassian Community!
When using Send Web Request in a rule to contain all supported fields in the issue, try sending the issue data in the web request body. That is one of the options in the action.
To learn what smart values / fields are probably, currently supported, please use this how-to article and examine the fields shown: https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html
Please note I indicated "probably, currently supported". I recommend experimentation to confirm which fields can be read or updated with rules.
Kind regards,
Bill
Hi @Bill Sheboy
Thanks for your reply.
Unfortunately the data has to be formatted in a specific way before being sent (has to have a certain JSON structure to be recognised), so sending the issue data as is wouldn't work.
I don't really need data outside of the 'details' and 'description' section within the issue, so any way to get that without having to know which individual fields to reference would be great.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As you have a defined structure needed, I believe you will need to hardcode it all or use inline conditions to selectively add the elements based on their presence / absence:
https://confluence.atlassian.com/automation/jira-smart-values-conditional-logic-1081351607.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Thanks, I see. That's a shame, it seems like a pretty basic feature that ought to exist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tacictus Anon Welcome you might check jira smart values: https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/
HTH
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nicolas Grossi Thanks for your response. I've looked over the documentation and was unable to find a way of getting/listing all fields (or all custom fields) via a single smart value (although it's entirely possible I've overlooked something).
Is there anything in particular you think might help in this situation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.