New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebsiteAgent Extraction Problem accessing sub path data #2817
Comments
Hi! I would suggest to either use the {
"instructions": {
"issue_ids": "{{ issue.custom_fields | map: \"id\" | as_object }}"
},
"matchers": [],
"mode": "merge"
} |
@dsander Thanks a million for your suggestion. The template option was not as clear for me so I tested with the Event Formatting option and got the following results which is closer to what I'm trying to do.
However, in my example, I was trying to simplify and did not mention the other fields name & value in the object with the ID field. How would you recommend using the MAP: for those fields as well? I looked at the Liquid Template Map documentation and did not see any reference to using multiple fields. I also tried this without success.
What would be perfect is if I could get it in a format that I could address it as {{ Website }} which is the value of Name and the results would be the value of the value field. So I guess that would be in the format; Website:domain.com Just to clarify that is; (Name):(Value) The ID in this case really is not very useful data. |
A How do you expect the final output to look? Generating a string/text from all those |
I made a condensed version of the JSON to explain what I'm trying to do;
I can already access the normal fields {{ issue.id }} and {{ issue.subject }} to pass the data to the downstream agents, but I do not know how to access the custom fields. In this example, I would like to be able to flatten/transform the custom_field called Website into {{ issue.Website }} and the data would be "www.mydomain.com". Does that make sense? |
Gotcha, this should work in a {
"instructions": {
"website": "{% assign website = issue.custom_fields | | where: \"name\", \"Website\" | first %}{{website.value}}"
},
"mode": "merge"
} I don't think it is possible to merge the |
Ok, I'll try it. So basically it would be addressable as {{Website}} right?. That should work. I'll report back. Thanks again for all your help! |
Almost, |
Yes, sorry I was getting my references mixed up. I have tested this and was not able to get it to work. The value is coming up blank. Any suggestions? |
Without any additional information? No |
I have been working on a problem for several weeks and could use some help.
I am using a WebsiteAgent to scrape data from Redmine to get our "In Progress" issues.
The problem is extracting the Custom Fields data in the "issue.custom_field" path.
below is a sample of an issue that is returned.
I've tried sending this data to another Website Agent using the below payload but not able to extract the "custom fields" data successfully.
Through research, I have tried the following values for "data_from_event"
Can anyone offer advice on how to extract these sub-paths into addressable values?
The text was updated successfully, but these errors were encountered: