youngmon/atlassian-qna huggingface dataset:
How can I get a count of tickets, then email it to myself?
Asked by David Wood:

I'm currently trying to automate a small task for our reporting where we need to know the number of tickets which are not in the status of "closed" at month end each month. Using the automation I feel like I'm close but doing something wrong as no value is output.

Also, just to let you know, that the JQL returns the value I want when test it but the output via email does not, where {{LookupIssues.size}} variable value is expected the email is blank.

![Jira count of issues.png](https://community.atlassian.com/t5/image/serverpage/image-id/151025iCE1C25D660C7FFBC/image-size/large?v=v2&px=999 "Jira count of issues.png")


Answers:
author: Bill Sheboy
body: Hi [@David Wood](/t5/user/viewprofilepage/user-id/3563185)

Smart values are case-sensitive, so perhaps try

```
{{lookupIssues.size|0}}
```

Please note that I added null handling so this will always return a number.

Best regards,  
Bill

comments: author: David Wood
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Thanks a lot for your reply, it has helped as the rule now outputs a number; although, I think the limitations of max 100 rows returned from a JQL query is now giving me trouble.

We have a fairly large number of tickets we are working with and wanted to ask if you knew of any alternative way that it would be possible to handle retrieving this count.

Best Regards,

Dave


author: Bill Sheboy
body: Hi, Dave.

Short answer is: no. JQL is throttled to return up to 100 issues, and even the REST API requires calling in chunks to get more issues.

Possible work-arounds are:

* Refine the JQL so it would return less than 100, and use multiple calls. E.g. reporting by project, by create month, by status category, etc.
* Or, if you want to investigate other options, consider looking at the built-in dashboard gadgets. They do not all appear to have the same limitation.
* And on the expensive side, there are probably reporting tools in the marketplace for purchase which are not limited by this 100 issue constraint

Sorry I could not be of more help on this one.

__Bill


author: David Wood
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Thank you again for all the information, its been really helpful and although Jira has some limitations you've explained everything and given the best answers I could ask for - much appreciated!

Thanks,

Dave


Tags: count

issue-link
How can we copy the attachments of an issue int ok an e-mail?
Asked by Rik007:

We urgently want to distribute attachments from issues in Jira by an automatic e-mail in jira automation. How to do that?


Answers:
author: Jack Brickey
body: It doesn't seem that this is possible at this time. Here is a similar post discussing the same thing - [Attach-file-Automation-for-Jira](https://community.atlassian.com/t5/Jira-Software-questions/Attach-file-Automation-for-Jira/qaq-p/1432757)

In that post it references and a suggestion to create such capability you may wish to vote and watch the suggestion- [AUT-460](https://codebarrel.atlassian.net/browse/AUT-460)

comments: author: Rik
body: Thank you Jack, though this is a real pain. There are so many smart fields but this one is essential!


author: Rik
body: Unfortunately issue [AUT-460](https://codebarrel.atlassian.net/browse/AUT-460) seems to relate to images. I want to copy all attachment with a ticket to an e-mail....


author: Jack Brickey
body: Personally I don't see this as essential. I get that it is important to you but essential would mean it is important to the majority and I don't see many inquiries on this. But I am just a user like yourself so just an opinion. For sure vote for the issue.


author: Rik
body: Hi Jack, thanks! So how can I vote? I do not see a button om the page.


author: Jack Brickey
body: Ah, in fact you cannot! It just occurred to me that these issues are part of the old code barrel instance and it is not open for watching in voting like the rest of JAC is. ?

You might consider using the Feedback link within the app and let Atlassian know that this is an important feature for you.


author: bmccoy
body: Hi,

Jack is correct, this is not something that we support at this time. I've linked made a note on [AUT-460](http://?https://codebarrel.atlassian.net/browse/AUT-460?) for you which essentially counts as a vote.

Cheers,  
Brydie


author: W Bot
body: This same lack of functionality prevents copying attachments from a service desk ticket into a software story ticket in an automated fashion, so that's why it's essential in my opinion as well.


author: Joshua Kapke
body: Vote: this would be essential for me too.


author: Alyssa Owens
body: I couldn't find an actual ticket to vote on anywhere so I made one as this is pretty critical for us too and would be an appreciated addition: <https://jira.atlassian.com/browse/JSDSERVER-11152>
Copy field value to another field
Asked by tal:

Using automation for Jira, I want to be able to copy the value in the sprint field to a custom field once the value is added.

I cant find a way to copy value with smart values


Answers:
author: Vikrant Yadav
body: Hi [@tal](/t5/user/viewprofilepage/user-id/4246771)

You can do this using the built-in Automation, located in project settings under "Project Automation" for service desk projects, or just "Automation" for other projects.

You would need to 2 different rules to capture both transition types. The first rule for example would look like:  

Trigger: Issue Transitioned  
Action: Edit Issue  
- Select Custom field from "Fields to set" and add in {{issue.Sprint.name}}  

Hope that helps,

comments: author: tal
body: thank you!
Jira pulling data from Microsoft PowerApps
Asked by Hashem ElHalwagy:

Hi folks,

I am not sure I have selected the right product category for my question. I was wondering if there was a way to pull data from an app I built on Microsoft PowerApps and is fed automatically in a page on a wiki. That whenever there is a status change on the app, it chnages the table on wiki automatically. this wiki is for SAP space

Thank you,

Hashem


Answers:
author: JD
body: Hi [@Hashem ElHalwagy](/t5/user/viewprofilepage/user-id/4460675) ,

We currently don't support automation for Conlfuence or in the editor. We have a public ticket open here <https://codebarrel.atlassian.net/browse/AUT-269> .

Thanks,

John


Tags: cloud
Automation rule for tracking bugs linked to stories
Asked by James Wardle:

I'd like to keep a count of the number of bugs linked to a story in a Jira project.

My approach to this has been to create a field called "Defect Count", and use the built-in Automation function to increase this field by 1 every time a Bug ticket type is linked to a story.

This works (I've also set it to decrease by 1 if the Bug ticket type is unlinked).

However, if a user links 3 Bug tickets to a Story in one action, the Defect Count field is set to 1, not 3.

Can anyone offer any suggestions on how to resolve this?


Answers:
author: Jack Brickey
body: You need a means of retrieving the number of linked issues whenever a new issue(s) is linked to an issue. I believe this is possible but have not attempted myself. here is a post that might help \~ [Add-number-of-linked-issues-to-the-custom-field](https://community.atlassian.com/t5/Automation-questions/Add-number-of-linked-issues-to-the-custom-field/qaq-p/1488536)

comments: author: James Wardle
body: This is perfect, thank you!
automation rule not triggering
Asked by gubbala prudhvi18:

i have created a simple automation rule to create a subtask when an issue is created

i have browse and create and edit permission for the project and the rule is in enable mode

when i check in the audit log of automation rule there is no execution of trigger


Answers:
author: Deepanshu Natani
body: Hi [@gubbala prudhvi18](/t5/user/viewprofilepage/user-id/4452042)

Please share a screenshot with details of how you have configured the automation rule.


author: Curt Holley
body: Also, who is the Actor of the rule? Does that account have the right permissions??


Tags: cloud
Is there a way limit the number of object you get from IQL query?
Asked by Kedar Kanel:

I am using "*objectType in objectTypeAndChildren(xxx)"*where xxx is objectid IQL query to get the objects. However I would like to get only 100 objects out of them. Is there a way to write IQL query such a way that I can get the required number of objects only?


Answers:
author: Elad Ben Noam
body: Hi [@Kedar Kanel](/t5/user/viewprofilepage/user-id/4437835)

There is no out-of-the-box feature to limit JQL results.

You can use "resolved \> -XXd" or "updated \> -XXd" on your query to limit the results, but it won't be a constant number.


Tags: cloud

insight

jira-service-management
How stop the automation rule that has already started?
Asked by Kedar Kanel:

I have created the rule to execute the groovy script upon met the certain condition. For the condition I wrote the IQL query to find the objects. Without thinking I wrote IQL query to find all the objects. Now when I ran the rule, its running for all the objects and I have thousands of objects, meaning it will take many hours to complete. Now when I want to stop the rule that is already running and limit the objects it will run for, I am unable to do so. I tried disabling but it didn't help.

Is there any way I can stop the rule that is already running?


Answers:
author: Julia Gracia
body: Hi,  
I think the only way available now is to disable Insight.


Tags: cloud

insight

jira-service-management
How do I create responsive automation in Jira?
Asked by Singleton, Shametta (Contr):

Is it possible to send automation assigned to team members assigned to the project? For example, I would like to send my team a daily standup form to fill out which either uploads in Jira or Confluence.


Answers:
author: Curt Holley
body: Hi [@Singleton, Shametta (Contr)](/t5/user/viewprofilepage/user-id/4394321) You could just schedule an email with a link to a confluence page (that you've prepared earlier) for them to fill out each day.

comments: author: Singleton, Shametta (Contr)
body: Thank you, that solution will work!


Tags: cloud
"Field value changed" trigger needs trigger conditions to stop false triggers
Asked by Alex Adland:

I'm using the "field value changed" trigger to find when a custom field has been changed. My issue is the custom field in question is used by 6 issue types and I am only interested when it changes for 1 of those 6 issue types.

So what I'm finding is, because the issue type condition is read after the initial trigger caused by the field changing in any of the 6 issue types, I am getting a lot of false triggers, which clearly wastes my allocated trigger quota.

I've looked at a manual trigger or scheduled trigger but because the field in question is a custom field, I cannot use a JQL query to find the issues of the required issue type that have been updated.

Has anyone else come across a similar false trigger issue due to no conditions on the actual trigger, and if so did you find a solution?

Many thanks in advance

Alex


Answers:
author: Dirk Ronsmans
body: Hi [@Alex Adland](/t5/user/viewprofilepage/user-id/1161846) ,

Well it's not so much that it's a false trigger it's more that the trigger itself cannot be configured specific enough.

You can indeed only say

* what field
* for what action

but other than that you'll have to write some logic to only continue the trigger based on the issue type. I'm assuming you've done that and since it has to evaluate that IF clause it will be one of your exeuctions.

i'd suggest logging a call for this at <https://support.atlassian.com/contact> to enhance the trigger. Without any enhancement, I feel you are "stuck" with creating it as a project specific trigger of which you have unlimited executions.

If you do need it as a Global rule well then I don't really see a solution with Automation.

comments: author: Alex Adland
body: Hi [@Dirk Ronsmans](/t5/user/viewprofilepage/user-id/124602)

Thanks for the quick reply, and yes your assumptions are correct regarding my automation has the logic to target the required issue type.

However I did now know that project automations had unlimited executions, I was being lazy and created a global rule as it is looking across 70+ projects. As a workaround I can convert the automation to project based for all required projects.

I'll also raise an enhancement request for the trigger to be configurable.

Many thanks for the great information.

Alex


Tags: cloud
Can't manage to make numerical operation with calculated field
Asked by Iana:

I have a calculated field that aggregates the time spent in the stories of an Epic and displays that aggregation on the Epic (see screenshot 1).

![Auto1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/148066i534FF4403A4BAC8A/image-size/large?v=v2&px=999 "Auto1.PNG")

I want to set up an automation rule where I substract the Epic Time Spent from the Epic Remaining Estimate. I manage to recuperate the raw values (in seconds) from both fields, but when I try to make a numerical operation between the two, I get nothing (see screenshot 2).

![Auto2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/148067i6742CA58B25BB38D/image-size/large?v=v2&px=999 "Auto2.PNG")

Here's the rule's outgoing message :

Le temps restant sur l'epic est {{issue.timeestimate}} et le temps pass? est {{issue.customfield_12406}} alors le vrai temps restant est {{issue.timeestimate.minus(issue.customfield_12406)}}

I suspect the problem comes from the fact that the Epic Time Spent field uses the point (.) instead of the comma (,) as a decimal separator (here we use the comma). Do you know how automation interprets that information then? I assumed it interpreted as text/String, but when I try to apply any of the String functions listed in the Automation Doc ([Text functions \| Automation for Jira Data Center and Server 7.0 \| Atlassian Documentation](https://confluence.atlassian.com/automation070/text-functions-1014664659.html))to it, it doesn't work.

Do you have an idea of what I could do to make it work?

Thanks in advance.


Answers:
author: nmenere
body: Hi [@Iana](/t5/user/viewprofilepage/user-id/4087588) ,

Can you try the following and see what it puts in the log:

```
{{#=}}{{#debug}}{{issue.timeestimate}} - {{issue.customfield_12406}}{{/}}{{/}}
```

That should tell us exactly what it is trying to evaluate.

Cheers,  
Nick Menere  
Automation Group Product Manager

comments: author: Iana
body: It works, thanks. The problem wasn't the calculated field but the syntax for substractions.
Web fragment loses action listener after issue update
Asked by Brian Ho:

I have a webitem displayed on my issues that will generate a username and password. It's hooked up to a web resource like so:![image.png](/t5/image/serverpage/image-id/147989iC98D249EB25130E3/image-size/large?v=v2&px=999 "image.png")

js/user-cred-gen.js:

```
AJS.$(document).ready(function () {

    function genUserCred() {
        var issue = JIRA.Issue.getIssueKey();
        let url = `/rest/cb-automation/latest/hooks/e6f8904f78fbf84cbb52ce913b553553968b2b31?issue=${issue}`;

        $.post({url: `${url}`, headers: { 'Content-Type' : 'application/json'}}, function(result){
            console.log("Ran successfully");

            JIRA.trigger(JIRA.Events.REFRESH_ISSUE_PAGE, [JIRA.Issue.getIssueId()]);
        });
    };

    function pollDOM(){
        const el = AJS.$('#user-cred-gen');
        console.log("Polling DOM for #user-cred-gen");
        if (el.length > 0) {
            AJS.$('#user-cred-gen').click(function(e) {
                genUserCred();
            });
        }
        else {
            setTimeout(pollDOM, 300);
        }
    }
    pollDOM();
});
```

When refreshing the page, the button works fine. However, if I edit a field on the customfield pane from the View Issue screen, the button no longer works.


Answers:
author: Brian Ho
body: this is how I'm editing the issue in the customfield pane: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/147990i400693ABF72529E1/image-size/large?v=v2&px=999 "image.png")


Tags: cloud

fragment

scriptrunner
not receiving bitbucket email notifications - possibly need removing from suppression list
Asked by Rich Reynolds:

From looking at other similar posts I believe my email has been put into the suppression list. This is likely because I've rejoined a company after having left for a few months so my email would have bounced during that period but is now active again.

Can someone please remove my email from this list if it is on there?


Answers:
author: Patrik S
body: Hello [@Rich Reynolds](/t5/user/viewprofilepage/user-id/5430081) and welcome to the Community!

Your email was indeed suppressed because of a previous email that was bounced with the error :

```
554 5.7.1 [internal] recipient address was suppressed due to customer policy
```

I went ahead and removed it from the suppression list, so you should be receiving new email s going forward.

In case you are still not receiving it, please let us know.

Thank you, [@Rich Reynolds](/t5/user/viewprofilepage/user-id/5430081) !

Patrik S

comments: author: Rich Reynolds
body: Hi Patrik,

I am now receiving the emails.

Many Thanks

Rich


Tags: bitbucket-cloud

cloud
Branch restrictions setup
Asked by jang shin:

I want to protect the main branch from NoMerge_\* branches, and set the branch restrictions.

Here's what I expect:

Merging from 'NoMerge_\*' to 'main' : Blocked

Merging from 'main' to 'NoMergw_\* : allowed.

However, I was able to merge 'NoMerge_TPR20681' into 'main'.

$ git merge NoMerge_TPR20681  
Updating 4aa9c40..bada640  
Fast-forward  
sst20604 \| 8 ++++----  
sst20681 \| 8 ++++----  
2 files changed, 8 insertions(+), 8 deletions(-)  
$ git branch  
NoMerge_TPR20681  
\* main  
$

How can I configure Git to block merges from any 'NoMerge_\*' branches into 'main'?

![branchrestrictionset.png](/t5/image/serverpage/image-id/306465i5A443A23929A6396/image-size/large?v=v2&px=999 "branchrestrictionset.png")


Answers:
author: Saxea _Flowie_
body: Hi [@jang shin](/t5/user/viewprofilepage/user-id/5301294) ,

Branch restrictions are based only on \*destination\*. So instead of protecting 'NoMerge_\*' you need to protect 'main'.


Tags: bitbucket-cloud

branch-restrictions

cloud
Is this a valid Bitbucket error? Or should I be worried?
Asked by Jonathan Duncan:

Doing some of the usual today, Git pulling, pushing, rebasing, etc and came across this response:

```
remote: ASAP validation failed:
  failed obtaining http response:
    Get "https://asap-distribution.us-west-2.prod.atl-asap.net/micros/bbc-scm-https-proxy/alp07c9ce78redua":
      dial tcp: lookup asap-distribution.us-west-2.prod.atl-asap.net on 10.255.0.1:53: no such host,
  failed obtaining http response:
    Get "https://asap-distribution.us-east-1.prod.atl-asap.net/micros/bbc-scm-https-proxy/alp07c9ce78redua":
      dial tcp: lookup asap-distribution.us-east-1.prod.atl-asap.net on 10.255.0.1:53: no such host
fatal: Authentication failed for 'https://bitbucket.org/<my-org>/<my-repository>.git/' 
```

Should I assume this is just a transient failure and keep retrying.


Answers:
author: Hariharan Iyer
body: Hi [@Jonathan Duncan](/t5/user/viewprofilepage/user-id/1170081) ,

There was an incident on Feb 14th as mentioned here -https://bitbucket.status.atlassian.com/. This was likely a transient error related to that.


Tags: bitbucket-cloud

cloud
Exclusive run pipeline on branches
Asked by Tiago Jesus:

I have my CI/CD configuration to run multiple steps on specific branches(dev, staging, master), but I can run the master pipeline on the Development branch.

This makes no sense and is a security issue to me!

How I can restrict running the master pipeline to the Development branch?

![Screenshot 2024-02-14 at 17.57.05.png](/t5/image/serverpage/image-id/306412i3957CF60ED2AAA0D/image-size/large?v=v2&px=999 "Screenshot 2024-02-14 at 17.57.05.png")


Answers:
author: Aron Gombas _Midori_
body: This older question is full of good ideas: <https://community.atlassian.com/t5/Bitbucket-questions/Limit-a-custom-pipeline-to-a-branch/qaq-p/705144>


Tags: bitbucket-cloud

bitbucket-pipelines

bug

cloud
Remove a linked issue from PR after editing commit messages
Asked by Jools:

Hi.

We have linked Bitbucket and Jira.

Let's imagine I push a commit with message "feat XX-123 this is a test" and another one with message "feat XX-456 something else" wrongfully referencing issue XX-456.

If I open a PR then XX-123 and XX-456 appear in the related issues panel.

Editing commit message doesn't change anything, XX-456 is still linked. There is no way to remove an unwanted issue from a PR.

It would be nice if linked issues were re-evaluated when new commits are pushed.

Thanks!


Answers:
author: Patrik S
body: Hello [@Jools](/t5/user/viewprofilepage/user-id/4969190) and thank you for reaching out to Community!

I'm afraid that currently the Pull Request linked issue keys are indeed not refreshed when the commit message is edited to either remove the wrong issue key or reference a new one. I definitely see the benefits of having that feature to refresh the links when new commits are pushed, so I went ahead and raised a feature request for it :

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

I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

One alternative, that may serve as a workaround while that feature is not available, is to [disconnect your bitbucket instance from jira](https://support.atlassian.com/bitbucket-cloud/docs/connect-bitbucket-cloud-to-jira-software-cloud/#Manage-your-linked-workspace-settings), and then c[onnect again](https://support.atlassian.com/bitbucket-cloud/docs/connect-bitbucket-cloud-to-jira-software-cloud/#Connect-your-Bitbucket-workspace-to-Jira-Software-Cloud). This will make bitbucket/jira go through all the pull requests and commits again and refresh the links.

Thank you, [@Jools](/t5/user/viewprofilepage/user-id/4969190) !

Patrik S

comments: author: Jools
body: Thank you, Patrick!

I just added my vote.


Tags: bitbucket-cloud

bug

cloud
Not receiving email to complete 2FA email verification process for Bitbucket
Asked by Ruben Felgenhauer:

I'm not receiving the necessary email to activate 2FA, even after multiple days. I can confirm that I have searched in all directories of my mailbox, that I can receive emails from other parties, and that I have received emails from Bitbucket before.


Answers:
author: Andy Heinzer
body: Hi [@Ruben Felgenhauer](/t5/user/viewprofilepage/user-id/5429583)

I found there was a suppression on your account. There was a bounced message when trying to reach your mail server of:
> 550 5.4.1 Recipient address rejected: Access denied. AS(201806281) \[BE0DEU01FT025.eop-deu01.prod.protection.outlook.com 2024-02-09T07:21:57.590Z 08DC293A6EDE1A87\]

While I have cleared the suppression, i would recommend walking through our steps in [Unblocking Office365 emails for Atlassian Cloud - Atlassian Community](https://community.atlassian.com/t5/Jira-articles/Unblocking-Office365-emails-for-Atlassian-Cloud/ba-p/1870108) as this explains some settings within Office/outlook that you could setup to help prevent this happening again in the future.

Andy

comments: author: Ruben Felgenhauer
body: Hi [@Andy Heinzer](/t5/user/viewprofilepage/user-id/541137)

Thanks for your help. Setting up 2FA worked now. I forwarded the link to my sysadmin who has made a few adjustments in the Microsoft Exchange settings (although they seem to have changed a bit since the article was published).


Tags: atl-rvw

bitbucket-cloud

cloud