youngmon/atlassian-qna huggingface dataset:
How can I create To Do issue type when an EPIC is created using JIRA automation?
Asked by Saili:

So my requirement is, whenever a user creates an EPIC in a project, the child issue of type 'To Do' should be created using automation rule.

Purpose: For tracking the progress of an EPIC through the To Do lists inside it.

I tried by using this:

When: issue is created

If issue type= Epic

Then: Create a new To Do

Here's the snapshot of the Automation rule that I have defined on my side:

![2024-03-12_11h58_38.png](https://community.atlassian.com/t5/image/serverpage/image-id/311529i26AD3C2AE514CD45/image-size/large?v=v2&px=999 "2024-03-12_11h58_38.png")

**This is failing**

But if instead of To Do, if I am defining issue type as create a new 'sub task'

Then is it working...

I would be grateful if anybody shares a workaround

This is the Audit Log:

![2024-03-06_16h32_52.png](https://community.atlassian.com/t5/image/serverpage/image-id/310575iA43B49E738145FA1/image-size/large?v=v2&px=999 "2024-03-06_16h32_52.png")

I have already selected an option to derive the 'Component' field from the EPIC, then too getting this error and the To Do is not created.

![2024-03-06_16h49_39.png](https://community.atlassian.com/t5/image/serverpage/image-id/310580i52CE0CEB84CBB073/image-size/large?v=v2&px=999 "2024-03-06_16h49_39.png")


Answers:
author: Bill Sheboy
body: Hi [@Saili](/t5/user/viewprofilepage/user-id/5409858) -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Until we see those...

If your rule is creating the new issue and copying from the trigger issue, this may be a timing problem in the rule.

The Issue Created trigger can fire so quickly that some data may not yet be available to the rule, leading to errors or unexpected results. The fix / work-around for that is to **always add a Re-fetch Issue action immediately after the Issue Created trigger**. This will slow down the rule a bit, reloading the issue data before the other steps continue.

Kind regards,  
Bill

comments: author: Saili
body: Thanks a lot [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)   
I realized where the actual problem was. This hint helped me: "**always add a Re-fetch Issue action immediately after the Issue Created trigger**".
Ask how to use Lookup issues action
Asked by koutarou ishibashi:

Under the parent task summaryA, there are summaryB, summaryC, and summaryD (each may also have multiple instances). I want to count when summaryB, summaryC, and summaryD are marked as DONE.

Using the Lookup issues action, I will search for the subtasks as follows: "Parent Link" = {{issue.key}} and status = done.

If there is summaryB under summaryA, and summaryB is done, I want to increment the custom field "CountB" by +1.

If there is summaryC under summaryA, and summaryC is done, I want to increment the custom field "CountC" by +1.

If there is summaryD under summaryA, and summaryD is done, I want to increment the custom field "CountD" by +1.

Using {{lookupIssues}} with Smart Value, I want to determine whether the subtask is summaryB, summaryC, or summaryD, and then proceed accordingly.

Please provide instructions on how to do this.


Answers:
author: Bill Sheboy
body: Hi [@koutarou ishibashi](/t5/user/viewprofilepage/user-id/5308713)

This question seems quite similar to your other question for performing counts with lookup issues, with the key difference being using subtasks:

<https://community.atlassian.com/t5/Jira-Software-questions/Ask-how-to-use-Lookup-issues-action/qaq-p/2626134>

Please see the responses to that question to learn if they also solve this one.

Regarding subtasks, consider using the {{issue.subtasks}} or {{lookupIssues.subtasks}} smart values to access those.

Kind regards,  
Bill

comments: author: koutarou ishibashi
body: I was able to count the issues with a value.  
Thank you.
How to update due date based on story points
Asked by chaiti ghosh:

##### Hi all i am trying to populate the due date based on story points in the ticket. {#toc-hId--1479677662}

1 Story point = 1 day

I created the automation rule when there story point is added ,due date is populated now + that many days

##### I am getting bellow error: {#toc-hId-1007835171}

![Screenshot 2024-03-01 at 12.33.05?pm.png](https://community.atlassian.com/t5/image/serverpage/image-id/309573iAFB7EC47FE6041F7/image-size/large?v=v2&px=999 "Screenshot 2024-03-01 at 12.33.05?pm.png")  
![1.png](https://community.atlassian.com/t5/image/serverpage/image-id/309569i241520C94F80660E/image-size/large?v=v2&px=999 "1.png")![2.png](https://community.atlassian.com/t5/image/serverpage/image-id/309571i5BE3BFE1C39A3D1B/image-size/large?v=v2&px=999 "2.png")![3.png](https://community.atlassian.com/t5/image/serverpage/image-id/309570iB0A7A399047B9083/image-size/large?v=v2&px=999 "3.png")


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

Please, do not mistake story points for time. A story point is not a day, an hour, a week, etc. A story point is an evaluation of how complicated an issue is compared with the other issues in your list of things to do.

If you want to work in days or hours, that's fine, but please move to using the original estimate instead, it is far better for working with times than stories.
How can I create different subtasks in different issues?
Asked by Petra Meier-Liepe:

Hello All,

I created a rule, when an issue is created, then several subtasks are automatically added to the issue. I did this in Jira Project Settings \> Automation \> create rule.

Now I want to differentiate between stories and bugs. E.g. I want to add 8 subtasks to stories, but only 5 subtasks to bugs. But I don't find this in the rule builder. So I need rules that say, "when story is created, then create subtasks" and "when bug is created, then create subtasks".

I'm grateful for any hints. :)

Petra![Unbenannt.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/309435iD5EA5895FA0ED751/image-size/large?v=v2&px=999 "Unbenannt.JPG")


Answers:
author: John Funk
body: Hi Petra,

Is this a Team-managed project?

After you create the Story, add a Branch for Most recently created issue. Then put the sub-tasks under there.

Then add another Branch for Bug and do that same thing with those sub-tasks.

comments: author: Petra Meier-Liepe
body: Hi John, yes, thank you!

I don't work that often with Jira. Therefore I don't know, what you mean.

Should I create a rule "When: issue created" and add a branch with {{issue.story}} and add subtasks, then?


author: John Funk
body: Sorry assumed too much :-) Yes, start with an Issue Created trigger.

Then add any Conditions so that it only does it for certain issues - what would that be?

You can send that to me here, but you can continue to build while waiting for me.

Next you add the Branch as above and then keep going with my recommendations above.

Do that and send me a screenshot of your rule that you have to that point.


author: Petra Meier-Liepe
body: O.k., thank you so much, John.

I'll try it tomorrow. Unfortunately I have no more time today.


author: Petra Meier-Liepe
body: I created 2 rules now, one for story and another one for bug. This is better for me. :)

Thank you, John!


Tags: sub-task
Acceptance criteria missing after transfer to a new project
Asked by Yimin Jiang:

Hello All,

I am trying to transfer story from a team-managed project to a company-managed project. Both story layout have Acceptance Criteria section, but after transfer, the acceptance criteria context lost.

Could anyone help? Thank you in advance.

![WX20240229-172744@2x.png](https://community.atlassian.com/t5/image/serverpage/image-id/309396i1372D70B84531161/image-size/large?v=v2&px=999 "WX20240229-172744@2x.png")![WX20240229-172704.png](https://community.atlassian.com/t5/image/serverpage/image-id/309395i089172182DE0E342/image-size/large?v=v2&px=999 "WX20240229-172704.png")


Answers:
author: John Funk
body: Hi Yimin- Welcome to the Atlassian Community!

Custom fields in Team-managed projects are self contained and not shared with any other project. So the Acceptance Criteria field in your Team-managed project is not the same field as the Acceptance Criteria used by your Company-managed project.

Here is guidance to help you with moving between the two project types.

<https://support.atlassian.com/jira-software-cloud/docs/migrate-between-team-managed-and-company-managed-projects/>

comments: author: Yimin Jiang
body: Thank you John.

The acceptance criteria field is the one I added into layout of the company managed project. But still missing the context after transferring.

Anything else I could check or try?


author: John Funk
body: I would open a support ticket with Atlassian to see why the content didn't get copied over. Please post back here with the resolution.

<https://support.atlassian.com/contact/#/>


Tags: acceptance-criteria

company-managed-projects

migration

team-managed-projects

transfer
Jira Automation - The "edit issue field value" action using Additional fields is blanking
Asked by Jamie:

I have 2 rules running across different projects. I have an action that assigns the value of the "Team" field because Atlassian has not included this as a supported field!  
Both rules are running successfully but if I go to edit that action in the rule, it's not showing the custom additional details that currently are saved for the action, just the default info like its new and needs to be completed. So I am unable to see/edit what is actually there!

Has anyone else experienced this?

![Screenshot 2024-02-29 172938.png](https://community.atlassian.com/t5/image/serverpage/image-id/309384i63362D376773AADF/image-size/large?v=v2&px=999 "Screenshot 2024-02-29 172938.png")


Answers:
author: Mark J
body: Same here. Actually is affecting all my automations/additional fields, but on my side looks they are not running the additional fields part.

It's related with the atlassian major incident on 28.02.24 but has anyone been able to recover the configuration of the automations?

[Jira Software Status (atlassian.com)](https://jira-software.status.atlassian.com/)


author: John Funk
body: Hey Jamie,

This appears to be an ongoing issue with Automation. You should go ahead and submit a support ticket to Atlassian.

<https://support.atlassian.com/contact/#/>
Clone Jira Issue to Project Boards
Asked by Oluseye Cole:

Hello,

So, I know a couple of questions have been answered about how to clone an issue from one project into the other. In my case, I have a company managed project - within this project, I have several boards - each board representing each team.

Now, I have set up an automation that clones a ticket created all the way from a team managed Jira Form. The ticket gets cloned all good. However, I want the ticket to be cloned into a specific board, and not the overarching project backlog.

To add some contexts:

This is as it is currently:

When issue is created

Clone into Project A (this project has many boards)

Delete Issue.

This is what I want it To Be:

When Issue is Created

Clone Into Project A Board C Backlog

Delete Issue

I hope I was as explanatory enough. Will appreciate any help.

Image below shows As Is rule.

Thanks![Screenshot 2024-02-28 191101.png](https://community.atlassian.com/t5/image/serverpage/image-id/309292i4E2D71B7D6CF3BF5/image-size/large?v=v2&px=999 "Screenshot 2024-02-28 191101.png")


Answers:
author: Mikael Sandberg
body: Hi [@Oluseye Cole](/t5/user/viewprofilepage/user-id/5440981),

Welcome to Atlassian Community!

This all depends on what the filter for your boards look like. So for board C, how do that board pick up issues? If the filter is looking for a specific label as an example, then all you would need is to add that label to the newly cloned issue.

comments: author: Oluseye Cole
body: Brilliant Mikael,

Thank you very much. Just a still a little confused, where do I add the label rule, the team managed project where the rule is initiated, or in board C?

I have already updated board C's filter to expect an issue with Label A - but the team managed project is not pushing Label A over. Looks like there's something I'm not getting right with the automation rule?


author: Mikael Sandberg
body: You can try and add the label in the automation that clones the issue by using the branch "Most recently created issue".


author: Oluseye Cole
body: You're a genius [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579)

Worked like magic.

Thanks a lot and kudos to the team behind Jira - it's an unbelievable tool.


author: Arkadiusz Inglot
body: Hello

Please keep in mind, issues are part of a project (technically speaking) not part of boards.

boards are just a visual representation of some JQL filter which allows you to see issues devided on columns (statuses).

It means you need to double check the board filter why it is not displaying such cloned issue.

comments: author: Oluseye Cole
body: Thanks a lot [@Arkadiusz Inglot](/t5/user/viewprofilepage/user-id/5254835) ,

Was able to get it to work with steer from yourself and [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579) .

I appreciate.
Delete Branch after Merge Checklist on Pull Request Page
Asked by Tobias Aditya:

Before today, whenever I make a PR using bitbucket UI, the checklist on for "Delete {branch-name} after the pull request is merged" is unchecked by default which is perfectly meet my team's workflow. But today, suddenly it is checked by default. Is this an update in policy and rules or is there any setting to prevent that by default?


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

This was due to an erroneous rollout earlier today, and this rollout/change was reverted at 5:32AM UTC.

Please check if this option is still checked by default on your end. We have tested it and can no longer reproduce this issue, so we are confident that this is resolved now.

Please feel free to reach out if you're still experiencing issues.

Kind regards,  
Theodora


Tags: bitbucket-cloud

branch

cloud

merge
Recreated a Jira project that a BitBucket repo was linked to. Now Jira Issues page just spins
Asked by Sheryl LeDuc:

I mistakenly created a Jira project using the wrong template and linked it to a bitbucket repo. Then, I recreated the Jira Project (deleted and created again). I went back to the bitbucket repo and it is not loading the Jira Issues. I cannot figure out how to remove the link to the Jira project and recreated it.

Is there a way to do this?


Answers:
author: Theodora Boudale
body: Hi Sheryl and welcome to the community.

This is a bug with the integration; deleting a Jira project that has been linked to a Bitbucket repo makes the **Jira issues** page of the repo inaccessible.

We have a bug report about this in our issue tracker:

* <https://jira.atlassian.com/browse/BCLOUD-22351>

You can select the link **This affects my team** in the bug report to indicate you are affected by the bug, and the link **Start watching this issue** if you'd like to receive email notifications on updates. Our development team tracks bugs in that issue tracker and will post an update there when it is fixed. Please note that we don't provide ETAs and bug fixing is implemented as per our policy [here](https://confluence.atlassian.com/support/atlassian-cloud-bug-fix-policy-206865884.html).

I haven't been able to find a way to work around this issue yet. However, if you make new commits to the repo and include in the commit message the Jira issue keys of a project, these issue keys will become links to the respective Jira issues. You should be able to view those on the **Commits** page of the repo.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
how can i restore deleted repository from bitbukcet?
Asked by chana roobinski:

I mistakely deleted a repository, can it be restored?


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

I checked the workspaces and repositories your account has access to, and I found one repo deleted by your user. A backup was available for this repo and I restored it. The timestamp of the deletion has been added to this repo's name, but you can change that from **Repository settings**.

Can you see the repo now when viewing all repositories of the workspace it belongs to?

Kind regards,  
Theodora


author: Daria Kulikova
body: Hello [@chana roobinski](/t5/user/viewprofilepage/user-id/5539500) and Welcome to the Atlassian Community!

It depends on whether you have a backup of your repository or not. If you have a backup you can restore it from the copy. If not, it can be harder. It's better to raise a ticket so that the support team can help you as if the deletion happened within the 7-day window, there is a possibility that your data can be restored. Here is a thread about it: <https://community.atlassian.com/t5/Bitbucket-questions/Recover-Deleted-Repository/qaq-p/1805128>

For the future, I would advise thinking of a backup strategy. There are some options, like Bitbucket Zero downtime, DIY backup scripts, or third-party backup tools. You can read more about different backup options here: <https://xopero.com/blog/en/best-bitbucket-backup-tools-for-secure-data-protection/>

Regards,

Daria


author: Jim Knepley - ReleaseTEAM
body: Maybe. It depends on your backups.

<https://confluence.atlassian.com/bitbucketserverkb/restore-a-deleted-repository-for-bitbucket-server-942841062.html>


Tags: cloud
Docker Inline Caching not consistently being recognized
Asked by Boris Kravchenko:

I am using inline caching with my docker image. When running docker build locally, the cache is always used. In my pipelines, the behavior is inconsistent and usually results in the entire dockerfile building from scratch. I have not been able to figure out where the problem is.

This is the start of the dockerfile:

*** ** * ** ***

```

# syntax = docker/dockerfile:1.2
# Dockerfile for customer container for Lambdas.
# Author: Boris K., 2022.07.27
# ERB-2638

FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.12.2024.05.22.12@sha256:8b72b07c4eeba48a87799c6357ddf3d0abbd28dd3e0ead220427839cd160121f

RUN dnf install awscli \
    gzip \
    wget \
    tar \
    sudo \
    unzip \
    xorg-x11-fonts-* \
    which \
    cargo \

    # below are needed the deps for LibreOffice
    libXinerama \
    java \
    nss \
    dbus-libs \
    cups-libs \

    -y && dnf clean all
```

Does anyone know why this first FROM command might pull from cache sometimes, but usually not? The layer should not be changing and the SHA is always the same. That is a static layer provided by AWS. So why would caching always work locally, but not in Bitbucket pipelines?

The command I am using for docker build is:

```
DOCKER_BUILDKIT=1 DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build . -t my_image:latest -f dockerfile --cache-from my_image:latest --build-arg BUILDKIT_INLINE_CACHE=1
```


Answers:
author: Theodora Boudale
body: Hi Boris,

I see that you created a support ticket for this issue as well. It is possible that you are affected by this bug <https://jira.atlassian.com/browse/BCLOUD-23193> and one of my colleagues is investigating whether this is the case.

Kind regards,  
Theodora

comments: author: Boris Kravchenko
body: For anyone else who comes across this. Yes, there is a known issue with docker caching and since BuildKit has been disabled in Bitbucket, commands related to BuildKit commands, such as --cache--from and --cache-to, cannot be relied upon to work properly.

Bitbucket also has an internal ticket to remove --cache-from CLI option they reference in online documentation. That option should not be listed in example commands provided.


Tags: bitbucket-cloud

cloud
step: ip-ranges is not working in afterscript
Asked by Ioannis Karydis:

just an example:

options:  
runtime:  
cloud:  
**atlassian-ip-ranges: true**  
definitions:  
common_script_items:  
- \&install_aws_cli apt update \&\& apt install -y curl unzip \&\& curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.9.20.zip>" -o "awscliv2.zip" \&\& unzip awscliv2.zip \&\& ./aws/install  

steps:  
- step: \&deploy-any  
name: 'Deploy Any'  
**size: 4x**  
service:  
- docker  
image: node:18-bullseye  
script:  
- \***install_aws_cli**  
**after-script:**  
**- \*install_aws_cli**  
the aws cli cannot be downloaded in after-script but it works in the script section.


Answers:
author: Ben
body: Hi Ioannis,

I have been unable to reproduce this on my end with an example configuration below:

```
options:
runtime:
cloud:
atlassian-ip-ranges: true

image: atlassian/default-image:4


pipelines:

custom:

 testip:
- step:
name: 'test'
size: 4x
script:
- curl http://checkip.amazonaws.com/
after-script:
- curl http://checkip.amazonaws.com/

```

Are you able to add that curl command above to your script prior to the install_aws_cli command and let me know which build IP addresses are recorded there?

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How to know exit code of last failed step?
Asked by Ajay:

I use windows based runner and sometimes my build system fails with exit code 2 or 3 that's not entirely a failure but warnings.

1. I would like to see them in bitbucket pipeline logs which I tried with after-script echo but doesn't work

2. Is there a way to tell pipeline fail a step only for exit code 1 and don't fail for other codes?

Thanks,  
Ajay


Answers:
author: Syahrul
body: G'day, [@Ajay](/t5/user/viewprofilepage/user-id/5050402)

Have you tried adding the echo command to show the exit code at the end of your script, for example:

```
- Running a command; echo "Exit code: $?"
```

Regards,  
syahrul

comments: author: Ajay
body: Pipelien fails at the line and doesn't proceed further. I would not be able run Exit Code $? after the failure of the step.


author: Syahrul
body: Hi [@Ajay](/t5/user/viewprofilepage/user-id/5050402)

If that's the case, maybe run your steps in a bash script for example:

```
#!/bin/bash

# Run your command
your_command_here

# Capture the exit code
EXIT_CODE=$?

# Check the exit code and decide whether to exit with an error
if [ $EXIT_CODE -eq 1 ]; then
echo "Command failed with exit code 1, failing the step."
exit 1
else
echo "Command completed with exit code $EXIT_CODE, but not failing the step."
exit 0
fi
```

This will check for exit code, and if the exit code is 1, it will failed the steps, otherwise it'll return complete steps.

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud