field value separation in post function

valkyre57 April 24, 2021

dears please help how to write right the separations of the different fields values 

{{
issue.fields.project.key == "CBS360" and issue.fields.issuetype.name == "Incident" and
issue.fields["Market Place"] | find({"value":".com"}) ["Problem Type"] | find({"value":"Awarding"}) ["Product"] | find({"value":"Casino"})
}}

 

 

 

Screenshot_1.jpg

 

 

 

 

3 answers

0 votes
valkyre57 April 24, 2021

Sorry for hurry

I am trying to add watchers when three fields values would be as mentioned in code 

Kevin Johnson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2021

Please explain what are you trying to do and what fields are involved etc.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2021

You have not said what you are trying to do with this query.  Please could you explain what you are trying to achieve?

Kevin Johnson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2021

Hey @Nic Brough -Adaptavist- ,

I have been noticing your name in the community since I started my Atlassian career, your answers have helped a whole lot of people and I am one of them. Thank you for the great job that you're consistently doing for the community. From learning from the community here I am answering few questions now and then, is there any advice that you would like to share for me, to perform well in this community? I would love to hear few words from you.

Cheers,

Kevin.

valkyre57 April 26, 2021

@Nic Brough -Adaptavist- 

i am trying add watcher when three field values are match . this code not working and please help to correct. no any errors

{{
issue.fields.project.key == "CBS360" and issue.fields.issuetype.name == "Incident" and issue.fields ["Problem Type"] | find({"value":"Awarding"}) and issue.fields ["Market Place"] | find({"value":".com"}) and issue.fields ["Product"] | find({"value":"Casino"})
}}

0 votes
Kevin Johnson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2021

Hi @valkyre57 ,

I would be glad to help you, but can you please elaborate on what are you trying to achieve here.

Regards,

Kevin.

valkyre57 April 24, 2021

I am trying to add watchers when three fields values are set.

when field "Market Place" value is ".com" and field "Problem Type"  value is "Awarding" and field "Product" value is "Casino" then add watcher 

Kevin Johnson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2021

{{ issue.fields.priority.name == "Blocker" and issue.fields["Project"].key == "TST" and issue.fields["Status"].name == "Open"}}

consider priority, project, status instead of your field values, using "and" between all the fields and for comparing "==" can be used as all other fields.

valkyre57 April 26, 2021

thanks for answering dear

i tried this but no adding watcher and no any errors please check

{{
issue.fields.project.key == "CBS360" and issue.fields.issuetype.name == "Incident" and issue.fields ["Problem Type"] | find({"value":"Awarding"}) and issue.fields ["Market Place"] | find({"value":".com"}) and issue.fields ["Product"] | find({"value":"Casino"})
}}

Like Kevin Johnson likes this
Kevin Johnson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2021

As I have mentioned above try to choose the custom field value and use "==" to check equals. I'm not so sure how find({""value:}) works.

Suggest an answer

Log in or Sign up to answer