youngmon/atlassian-qna huggingface dataset:
"To" field for triggering an E-mail Notification is not taking the "Assignee" value of an issue.
Asked by rish_kr221:

Hi all,

Im working on an automation rule for triggering an email notification depending on some filter criteria for some issues.

there is an error in the audit log.

Could not send email, the 'To' address field is empty. If you have referenced a field it may be empty.

Can someone tell me why this is happening.


Answers:
author: Callum Carlile _Automation Consultants_
body: Hi [@rish_kr221](/t5/user/viewprofilepage/user-id/4419698) , welcome to the community!

In order for the email to be sent successfully, it needs to have a recipient. If you have, for example, configured your rule to send an email to the task's assignee at a certain point in a workflow, if the task does not have an assignee when the rule is triggered, the rule will fail as it has no one to send the email to.

In your automation rule, which field is being used in your To: field in the email action?

comments: author: Daria Pavlova
body: Hi! I have the same issue with my Rule but al tasks are 100% assigned, the automation just won't see the field info. What can be the problem?


author: Rhys Richards
body: Hey,

i have the same issue, all my tickets have assignees and the audit file says "  
Could not send email, the 'To' address field is empty. If you have referenced a field it may be empty."  
really odd this


author: Daniel Ebers
body: Hi [@rish_kr221](/t5/user/viewprofilepage/user-id/4419698)

for using the Assignee it should just work according to the hints from Curt and Callum.

In case you would be using a "team-managed project" alongside with a people field it might be you are running into this effect: <https://jira.atlassian.com/browse/JSWCLOUD-20774>  
I don't assume this matches with your case but in case you could confirm Community members might be able to advise further.

Regards,  
Daniel


author: Curt Holley
body: Based on the error message, it is either as [@Callum Carlile _Automation Consultants_](/t5/user/viewprofilepage/user-id/2348878) has described, or you haven't opoulated the "To" field of the Send email Action.

![mail0.png](https://community.atlassian.com/t5/image/serverpage/image-id/145917iF17386832994124B/image-size/large?v=v2&px=999 "mail0.png")


Tags: cloud

jira

jira-server
How to automate sending large amount of REST API requests, and field changes?
Asked by Koczka Bence:

I have an Insight object schema, with an Object in it, called Computer.

This Computer object has 4 fields:

* Name
* CPU
* RAM
* Owner

All of these fields, except the one called "Name" are empty, and I have to give them value from a separate API endpoint.

I need the "Name" attribute to identify the Computer in the POST request sent to the separate API endpoint, and I need one request for each of the 3 fields I want to populate ( CPU,RAM, Owner),

For example, a request I can make looks like this:  
https://separateAPI/api/{{computerName}}/Ram/  
which returns the RAM of the computer I'm looking for.

So the problem is, I have lot's of Computers, I am looking for a way to automate sending the API requests for each Computer I have.  

After some time of tweaking Automation for Jira, I am starting to think it's not the right tool for this, because I have to manually configure each API request sent out, as an action.  

I am looking for an answer, if there is any way to achieve this in Automation in Jira, or which other tool would be able to help me? Or is it the worst case scenario, and I should write my own application for this?


Answers:
author: Alex van Vucht (GLiNTECH)
body: The new "When Object Changes" rules are great for bulk automations like this. I have been using the "Status" to manage when these automations are used.

In this response, I am going to assume that your endpoints return the values as a simple JSON object, eg. for RAM: {value:"16GB"}

In your case, I would do something like:

1. When Object is Updated in schema Assets

2. If IQL: objectType = Computer and Status = "Action Needed"

3, 4, \& 5. Send outgoing webhooks for CPU, RAM \& Owner

6. Edit object:

* CPU: {{webhookResponses.get(0).body.value}}
* RAM: {{webhookResponses.get(1).body.value}}
* Owner: {{webhookResponses.get(2).body.value}}
* Status: Active

To trigger an update, just do a Bulk Change of the Status attribute to "Action Needed". If you tick the "Allow this rule to be triggered by other rules", you must change the Status to something else at the first Edit Object rule otherwise you'll end up in a loop,

Finally, you may have encountered a particular frustration, which is that you can't call Text functions on Insight attributes. This means you can set the URL to https://separateAPI/api/{{object.Name}}/Ram/ but if you try to do https://separateAPI/api/{{object.Name.urlencode}}/Ram/ then the Name is blank and the request fails. This is because Automation is treating "Name" as if it was another object, and not a Text value.

It took me a few hours to work this out, but you have to dig into the object to get the Text representation of an attribute that allows you to call the Text functions. So this will work:

https://separateAPI/api/{{object.Name.values.get(0).displayValue.urlencode}}/Ram/

Hope this helps!


Tags: api

cloud

field

request

update
Lookup issue actions working with custom fields
Asked by Dan Tombs:

Hi All,

I have had a look at <https://support.atlassian.com/jira-software-cloud/docs/automation-actions/#Automationactions-Lookupissues> which explains how we can do the bulk processing of jira tickets to send in emails etc. But this only states that we can use system data. When can we or can we expect at all that this lookup issue actions will work with custom field data.

The big use is being able to process data out for emails etc. System data is great but custom fields allows it to be so much richer.

Thanks


Answers:
author: Ste Wright
body: Hi [@Dan Tombs](/t5/user/viewprofilepage/user-id/27566)

You can follow the request for custom fields in both:

* <https://codebarrel.atlassian.net/browse/AUT-1996>
* <https://jira.atlassian.com/browse/JRACLOUD-75018>

I would suggest voting for JRACLOUD-75018 to help Atlassian know you're a user who is looking for this functionality.

Ste


Tags: cloud
Append a value to a custom field of type as an action
Asked by Miguel Blasco:

Hi,

I'm trying to update a custom field that allows multiple object values, and I would like to add another object when the summary field is updated.

I'm have not found documentation on how to do this on automation, and when I try the following:

{  
"update": {  
"custom_XXX": \[{  
"add": {"key":"YYYY"}  
}\]  
}  
}

I get an error that the field is not an array.

I guess it is needed to do some JSON manipulation.

How would be the proper way to achieve it?

Thanks


Answers:
author: Sherry Goyal
body: Hello [@Miguel Blasco](/t5/user/viewprofilepage/user-id/3357389)

Documentation is present [here](https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/).

I would suggest to make some GET API calls to validate structure of object, allowed values and possible operations. Look for more details [here](https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/#Advancedfieldediting-JSON--Supportedfields-amp-operations).

Hope this helps to debug your case here.

Cheers  
Sherry

comments: author: Miguel Blasco
body: Thanks, the field supports the following operations:

```
"customfield_19430":{"required":false,"schema":{"type":"any","custom":"com.riadalabs.jira.plugins.insight:rlabs-customfield-object-multi","customId":19430},"name":"XXX","fieldId":"customfield_19430","operations":["add","set","remove"]}
```

and when i try to perform the following action:

{  
"update": {  
"XXX": \[{  
"add": "YYY"  
}\]  
}  
}

I got the following error:

Error editing issuesCLM-636 (data was not an array (customfield_19430))

What am i doing wrong?

Thanks


author: Sherry Goyal
body: Hello

Your schema type is "any" not "array", hence you are facing this issue. Might wanna try re-creating custom field of type array and this shall work then.

Sherry


author: Miguel Blasco
body: Hi,

Thanks for the input. But would it be possible to do something else on the update action?

This is a heavily used field and changing the type might be not possible at this point.

Thanks and best regards,

Miguel


author: Sherry Goyal
body: For updating Insight fields, might be good to try this: <https://documentation.mindville.com/display/ICV53/Insight+with+JIRA+REST-API>

Let me know how it goes!


author: Miguel Blasco
body: yes , this documentation helped.

FYI you can still have add operations despite having a type "any". the issue was how i was adding the value:

"add": "YYY" -\> "add": \[{"key": "YYYk"}\]

maybe for the future it would be useful to have those links on the automation documentation? Or at least made more explicit?

(It might be the first 2 were visible, but not the latter).

Thanks and best regards,

Miguel


author: Sherry Goyal
body: Glad to hear that. Thanks for the update. This work in is progress to put together these docs but yes I will update our technical writer with your feedback.

Thanks!


Tags: cloud
Is there a way to automate issues like this?
Asked by Koczka Bence:

There are some Insight fields' values I am changing currently with simple automations.  
My current rule looks like this.

1. Manual Trigger (to make testing easier)
2. Web GET-request to an API, receive response. (from Zabbix monitoring)
3. Send a POST API request to Insight end-point to change the value of certain field.

Currently with an automation rule like this, I can change only one attribute/rule, but there are hundreds of objects, and there are 20+ attributes to each object, I want to change.

My problem is that I have to manually set up each rule to change only one value of one object, but I need a way to change all objects' many values, using some form of automation

I am starting to think Automation for Jira may not be suitable for my purpose. Please let me know if there is a solution for this issue, or tell me what other way could I have a look at.

I hope I managed to paint a clear picture of my issue, if further clarification is neeeded, please let me know.


Answers:
author: Wouter van den Berg
body: Hi [@Koczka Bence](/t5/user/viewprofilepage/user-id/4289577)  

I don't fully understand your request but you could use advanced branching like this:   

![Screenshot 2023-08-16 at 12.55.05.png](https://community.atlassian.com/t5/image/serverpage/image-id/275439i32B6D81928E4BB4B/image-size/large?v=v2&px=999 "Screenshot 2023-08-16 at 12.55.05.png")  

With the branching you would be able to look at objects you want to update that have missing data. Use the identifier to target the webrequest so you can retrieve that data. The problem with this is that you can only iterate 50 objects with AQL branching so you should add an attribute date field that you update. In your AQL branch you make sure you skip the ones that have that date filled for today. This way you could schedule this (instead of a manual trigger) an X number of times and each time it will do another 50 objects that do not have the Last Sync Date set to today.   

To set the Last Sync Date attribute you could use {{now.format("dd/MMM/yy")}} at the end of the branch.   

The rest of the Automation rule is pretty self explanatory but feel free to reach out if you have questions.


Tags: api

cloud

insight

request
JIRA SERVER: Can I use automation for jira to return a list of tickets + send slack?
Asked by Julia:

I want to use automation for jira to do the following

get a list of issues where "x" custom field was updated in the last week

Send that list via a slack message

--------

I know how to use a webhook for the slack message but I am not sure if it is possible to get automation to give me that list then call it to the slack message. I know how to use smart values but struggling. thanks!!!


Answers:
author: Bill Sheboy
body: Hi [@Julia](/t5/user/viewprofilepage/user-id/3416541)

You can do this, and the tricky part is detecting the changes to a custom field in a window of time.

If you have one of the scripting/JQL addons from the marketplace that may be easier; otherwise you would need some way to indicate the field changed, perhaps by using another custom field to record the date/time the field was last changed (with automation or a scripting addon).

Once you have the issues list available via some query (JQL), you could use a scheduled rule to look at the {{issues}} smart value to send the message.

Please look here for an example doing that with issues treated in bulk:

* <https://confluence.atlassian.com/automation/bulk-handling-of-issues-993924653.html>

And look here for information about sending that information to Slack:

* <https://confluence.atlassian.com/automation/actions-993924834.html#Actions-sendslackmessageSendSlackmessage>

Best regards,

Bill


Tags: custom-field

jira

server

slack

smart-value

webhook
Email notification to EPIC assignee when status of the parent link changes
Asked by Brenda Lee:

Hi,

i will like to know whether it is possible to trigger an email notification to the assignee of an EPIC when I change the status of the Feature (which is the parent link of the EPIC).

thank you

brenda


Answers:
author: Ste Wright
body: Hi [@Brenda Lee](/t5/user/viewprofilepage/user-id/4414856)

I've got this to work, but not using "Parent", as there's only options for Parent of Subtask, and Parent Epic in Automation.

---

This is how I did it:

* **Trigger:**Issue Transitioned: Leave Blank if it's for all statuses, or specify From/To where needed
* **Condition:** Issue Fields Condition - *Issue Type = Feature*
* **Branch:** Set "Type of related issues" to JQL, then...
  * **JQL:** *"Parent Link" = {{triggerissue}}*
* **Action (under Branch):** Send Email:
  * **To:**Assignee
  * **Subject/Content:**Enter as needed

---

This will send an email to each Epic's Assignee. If a user is an Assignee on more than one Epic, they will receive multiple emails.

You could include specific data in the email Content where needed. For example, to include the Feature's status use the smart value *{{triggerissue.status.name}}*.

For more information on smart values, see [this page](https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/).

Ste

comments: author: Brenda Lee
body: Hi [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470) , this answers my question 100%. I tried it and it works perfectly. Thank you very much for your help!


author: Jack Brickey
body: I believe that should be possible although I have not tried it specifically. I think it would look something like this...

* trigger - issue transitioned
* condition - check the issue type to align with what you are looking for and also checked out the epic link is not empty
* action - for the parent of the issue Send an email to the assignee


Tags: cloud
error MSB4019 for database project on pipeline.
Asked by LineWriter:

Hi, I have the following issue. I have a solution in net 8 and within it I have a database project (.sqlproj) and when I run the pipeline it shows me the error that I share with you in the image. In my IDE I already excluded that project so that it does not compile and does not show an error, but within the pipeline I have not been able to do so so that it does not throw the error and the continuous integration is carried out successfully.

![pipeline error.png](https://community.atlassian.com/t5/image/serverpage/image-id/305990iA6D04EE565D72B33/image-size/large?v=v2&px=999 "pipeline error.png")


Answers:
author: Theodora Boudale
body: Hi [@LineWriter](/t5/user/viewprofilepage/user-id/5428111) and welcome to the community!

If this specific file is not necessary for the build, you can add a command in your bitbucket-pipelines.yml file to delete it, before running the dotnet build command, for example

```
- rm myfolder/myfile.sqlproj
```

This will not delete the file from the Bitbucket repo, but it is going to delete it from the clone where the build runs.

In case the file is needed for other commands you run later on, then it would not be advisable to delete it. In this case, I would suggest reaching out to a forum specific to dotnet development, to ask if there is any configuration you can make in your project's source code or the dotnet build command, that will allow you to exclude this file.

Kind regards,  
Theodora


Tags: .net

bitbucket-cloud

bitbucket-pipelines

cloud

continuous-delivery
Deactivated bitbucket account
Asked by Stephen Bennett:

I used bitbucket a while ago. I think my account has been disabled. What needs to happen to get my account reenabled.


Answers:
author: Syahrul
body: G'day [@Stephen Bennett](/t5/user/viewprofilepage/user-id/514505)

It appears your Bitbucket account was in an inactive state so I went ahead and reactive your account.

Could you try to log in again and let me know how it goes?

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
VERY URGENT !!! how to access repository -- disappeared without any notice
Asked by gfiorentini:

I have (had) a repository at <https://OurOrg@bitbucket.org/workspace-id/repo.git> but this has vanished from the bitbucket UI and all other repos in that <https://OurOrg@bitbucket.org/workspace-id/> location are gone.

I can see some expected repos at <https://OurOrg@bitbucket.org/> such as <https://OurOrg@bitbucket.org/workspace-id>, but repositories located under the path 'ourdev' are gone.

Is there any way to find these missing repos?

An announcement indicated Feb. 24, 2024 as the date for the closure of services. But today is Feb. 12, so why these problems, without moreover notifying users !!! This behavior is not acceptable.  
I hope to receive a reply as soon as possible.


Answers:
author: Theodora Boudale
body: Hi [@gfiorentini](/t5/user/viewprofilepage/user-id/5427872),

Just a heads up, I removed workspace ids and repo names from your post to comply with our privacy policy.

You can follow these steps to view repos of different workspaces you have access to:

1. Log in to <https://bitbucket.org/>
2. Select your avatar (top right corner) \> **All workspaces**. You will see a list of all workspaces your account has access to.
3. Open a certain workspace in a new tab
4. Then select **Repositories** from the menu at the top

You will then be able to view all repositories of this workspace that you have access to.

One of the repos you listed in your reply still exists. I cannot see the other one.

You can check the Audit Log of the workspace to see if the repo was deleted or transferred (the Audit Log shows repo transfer and deletion events).

You can view the Audit Log the following way if you are a workspace admin:

1. While you are viewing the workspace, select the cog icon next to your avatar \> **Workspace settings**
2. Select **Audit Log** from the left sidebar

There is also a possibility that the repo was renamed. The Audit Log doesn't show rename events, but you can check the contents of each repo to see if you can find the one you are looking for.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


author: gfiorentini
body: The repos are:

<https://bitbucket.org/workspace-id/repo>

<https://bitbucket.org/workspace-id/repo>

Can you reactivate ?


Tags: bitbucket-cloud

cloud
Getting "Invalid length for parameter WebIdentityToken, value: 1, using Open ID Connect
Asked by Saad Jahan:

I want to trigger the AWS backup service whenever the Bitbucket pipeline runs and i am using Open ID connect and it works well for deployment on S3 and Elastic Beanstalk as the backend  
currently, I am using the same IAM Role: AWS_OIDC_ROLE_ARN to trigger the AWS Backup service and also created a lambda function to trigger the AWS backup service when Bitbucket triggers lambda,.  
Both approaches got the same error   

Parameter validation failed:  
4
Invalid length for parameter WebIdentityToken, value: 1, valid min length: 4

and it's due to the Open ID connect approach, how to resolve this issue   

here is my script   

pipelines:  
default:  
- step:  
name: Install AWS CLI v2 and Invoke Lambda  
image: node:16  
script:  
- curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"  
- unzip awscliv2.zip  
- ./aws/install  
- aws --version  
# Set up the environment for Lambda invocation  
- export AWS_REGION=ca-central-1  
- export AWS_ROLE_ARN=arn:aws:iam::468973563763:role/BitBucket-access-Role-EB-deploy  
- export AWS_WEB_IDENTITY_TOKEN_FILE=$(pwd)/web-identity-token  
- echo $BITBUCKET_STEP_OIDC_TOKEN \> $AWS_WEB_IDENTITY_TOKEN_FILE  
- echo "$BITBUCKET_STEP_OIDC_TOKEN" \| wc -m  
- echo "$BITBUCKET_STEP_OIDC_TOKEN" \> $AWS_WEB_IDENTITY_TOKEN_FILE  
- cat $AWS_WEB_IDENTITY_TOKEN_FILE # Check the content of the token  
- cat $AWS_WEB_IDENTITY_TOKEN_FILE # Check the content of the token  
- unset AWS_ACCESS_KEY_ID  
- unset AWS_SECRET_ACCESS_KEY  
# Invoke the Lambda function  
- aws lambda invoke --function-name Custom_RDS_Backup_using_AWS_CODEPIPELINE --invocation-type Event --payload '{"key":"value"}' --region $AWS_REGION response.json  


Answers:
author: Theodora Boudale
body: Hi Saad and welcome to the community!

I noticed that your step doesn't have OIDC enabled. Can you try adding

```
oidc: true
```

in the step and then run another build?

You can check the example bitbucket-pipelines.yml file on this page:

* <https://support.atlassian.com/bitbucket-cloud/docs/deploy-on-aws-using-bitbucket-pipelines-openid-connect/>

Kind regards,  
Theodora

comments: author: Abhinay Sutrakar
body: Hi,

We are still facing even the oidc:flag is true


author: Theodora Boudale
body: Hi Abhinay,

Please create a support ticket and provide the URL of the Pipelines build with this error for further investigation. The support ticket will be visible to you and Atlassian staff, so anything you post there won't be publicly visible.

You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud