welcome to the community and thank you for your question.
It looks like you mixed things up a little bit.
To display the size, you should use
{{lookupObjects.size}}
To geht the content of each object (e.g. name) you could iterate over the list (thats where the # sign is used for):
{{#lookupObjects}}
{{Name}}
{{/}}
Hope this helps
Hi and thank you!
I have tried the code you´re suggesting, but it doesn´t work - Jira interprets it as raw text and not as variables. I have to add the $-sign, so the following works for me:
${#lookupObjects}
- ${Name}
I don´t know if it´s because we´re running Jira as a data center and not in the cloud?
As for printing out the number of lookupObjects, neither {{lookupObjects.size}} nor ${lookupObjects.size} works for me. It´s like the automation is unable to interpret ".size". I have also tried ".count", but that´s not working either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry for the misleading answer. I'm not quite sure if I got you right. The code you wrote is for cloud, but you selected that your environment is DC/Server. Could you clear things up and maybe post a screenshot on the Automation rule configuration?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kai Becker
Thanks´ for your patience!
Our environment is DC/Server (at least as far as I know - it´s the group's IT that manages it and I have been told that it´s an on-premise environment).
Attaching a screenshot of the automation rule. Not all the text in the message box is visible, so I´ve pasted it further below.
Code in the message box:
Number of products to control: ${lookupObjects.size}
${#lookupObjects}
- ${Name}, next day for control: ${Test med datum}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no worries. I'm sorry, that I did not read everything in detail. As far as I know, there is no such thing like lookupObjects in DC. This is probably taken from the cloud documentation.
The assets "smart values" work a little bit different on DC. You will probably need to take a look at this page: https://confluence.atlassian.com/servicemanagementserver/advanced-placeholders-1044784599.html
I'm not quite sure if it is possible to extract the data you need to have in an easy way.
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.