Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How would I get a value from a property using Automation for Jira

I've tried following the help on getting values from properties, but failed to work out the correct format for getting a property with multiply values.

The value can be seen when using the following URL.
https://*****.atlassian.net/rest/api/2/issue/73304/properties/proforma.forms.i1

It's path, using JSONView, within this URL is:
value.questions[7].text

Does anybody know how to format the {{issue.properties}} smart-value to get at this property?

Any help is much appreciated.

 

3 answers

1 accepted

I managed to find the solution with some help from the codebarrel support team.

{{issue.properties."proforma.forms.i1".questions.get(7).text}}

The quotes were the unknown bit, and the i1 is a dynamic reference to the form in the properties (incrementing number), but as long as we add our attached forms in the correct order we should be able to reference it.

Not perfect, but workable!

 

Some additional info:

I used the following URL to some the list of properties. I could then click on the property I was after and drill down through to find the individual elements required.

https://********.atlassian.net/rest/api/2/issue/ISD-99999/properties

You are a life savor!!! I have been working on this for days. I was trying to use regex to get the data I wanted but this is so much cleaner. Plus the regex was not working at all.

0 votes
Iago Docando Community Leader Mar 04, 2019

Since you only have problems when dealing with multiple values... Have you checked https://docs.automationforjira.com/working-with-issue-data/multi-value-fields.html#examples?

Unfortunately not. The list functions do not appear to work on properties. I have tried many variations but with no success. Perhaps I am formatting incorrectly, but I cannot find any good examples in extracting values from properties. Thanks.

0 votes

Hey there Jon,

Unfortunately, getting out complex (ie. JSON objects) or lists from the properties in Cloud isn't supported at the moment. I've raised a ticket for it at https://codebarrel.atlassian.net/browse/AUT-1361

It might be a bit tricky since we don't know generically what type a property might be

Cheers,

Mark C

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

209 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you