Sorry if this is hard tounderstand as it it a machine translation.
I am in the process of creating a process to split the value of a custom field in an automated process and store it in a variable.
*Use smart values.
Trying it out in the "comments to the issue" section, Get the value of the custom field, The result of the split is empty.
Is there an incorrect way to specify the smart value?
In addition, the following is what is specified in the custom fields and smart values.
【Custom fields】
Type: single picker
Content:開発_サーバ#1:dp0vmpx201
【AutomationProcess】
Smart value:{{issue.開発環境ホスト名.split(":").second}}
{{issue.開発環境ホスト名}},it will be displayed without any problem.
Hi @恩田翔 ,
If I understand your needs correctly you have a text string in a custom field that will contain the character : and you would like to extract the second value dp0vmpx201. If this is correct I believe your issue is with the .second you are using in the split function. see below for what you can use to retrieve either side of the string from your custom field.
{{issue.開発環境ホスト名.split(":").get(0)}} should return 開発_サーバ#1
{{issue.開発環境ホスト名.split(":").get(1)}} should return dp0vmpx201
Let us know if this works, if not someone else might have an alternate approach that could work.
Thanks @Kevin Patterson
I ran the "Add a comment to the issue" with the smart value you provided.
smart value:{{issue.開発環境ホスト名.split(":").get(1)}}
The result was still the same: empty text.
I am also using if conditions, etc. in an automated flow.
Does the composition of the flow, etc. have an effect on this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @恩田翔 , if the action setting the smart value is done inside the if conditions and those conditions are not met then this could have an impact. For testing i'd recommend creating a separate automation rule that has a manual trigger and only has the smart value and add comment actions. Once you get this working you can validate that the {{issue.開発環境ホスト名.split(":").get(1)}} extracts the correct value and the move on to troubleshooting your other automation rule. I've tested this in one of my instances and it looks to be working as expected. for my testing I added your text string to description and configured my smartvalue to pull out the value to the right of the : in the string.
automation rule:
Issue with automation rule populating comment:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi, @Kevin Patterson
In this case, the custom field for which the desired processing was to be performed had a single picker selected as the type.
In that case, it seemed to have the data internally in an array, so I gave it a “.value” as follows, and it worked.
{{issue.開発環境ホスト名.value.split(":").get(1)}}
Thanks for taking the time to discuss this with me.
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.