youngmon/atlassian-qna huggingface dataset:
Custom Banner with Conditions
Asked by Gor Greyan:

Hi dear Colleagues,  

Can you suggest any add-on, that provides possibility to have custom banner with HTML script, like <https://jibrok.com/docs/message-field/overview/> this plugin for Jira Cloud, This one is not being supported in Jira Cloud.


Answers:
author: Brant Schroeder
body: [@Gor Greyan](/t5/user/viewprofilepage/user-id/5476846) check out these apps in the marketplace - [https://marketplace.atlassian.com/search?hosting=cloud\&product=jira-service-management\&query=custom%20announcements](https://marketplace.atlassian.com/search?hosting=cloud&product=jira-service-management&query=custom%20announcements)


Tags: banner

cloud

jira-service-management

jira-service-management-cloud
How to create SLA with Custom Field + Status change as the condition to finish
Asked by Daniel Blomqvist:

Hi team,  
I was trying to set up SLAs in our Jira Service Management Project, but I had some problems with my first one because we want it to finish counting when:

1. A custom field has a value (single select list)
2. AND the status is anything else than NEW

But I can't find a way to use the "custom field has a value" as a condition to stop counting.

Is this even possible?  
Or do you have a suggested workaround?


Answers:
author: Patrick Tripodi
body: Hi Daniel,   

You could have a hidden status in your workflow (hidden by a condition on the transitions that only the Automation user can see)   

Automation checks if the value of your custom field changes, and if it changes to match your option, it will transition to that status, automation will then transition it back to where it came from.   

This will stop the SLA, maybe not as clean as you were hoping for though.   

++Workflow Setup++

Setup your transitions to be hidden to everyone but the Automation user. I always do project role is in atlassian-addons-project-access which is where the Automation user is in.  
![SCR-20240505-kykz.png](https://community.atlassian.com/t5/image/serverpage/image-id/321964i38C148882D305213/image-size/large?v=v2&px=999 "SCR-20240505-kykz.png")  
++Example Automation First++   
(I used Priority as the field to check but you can use any custom field)

Trigger: Value field changes: Priority (your custom field)  
Condition: Smart value compare: {{fieldChange.toString}} equals Critical (whatever your value you want to act on)  
Action: Transition to Progress Update (whatever your temp status is called)

![SCR-20240505-kypq.png](https://community.atlassian.com/t5/image/serverpage/image-id/321965i9696E0308215C143/image-dimensions/289x267?v=v2 "SCR-20240505-kypq.png")

++Example Automation Second++

Trigger: Value field changes: Status  
Condition: Smart value compare: {{fieldChange.toString}} equals Progress Update (whatever your temp status is called)  
Action: Transition to {{fieldChange.From}} (Transitions back to where the original status was)

![SCR-20240505-kzez.png](https://community.atlassian.com/t5/image/serverpage/image-id/321966i12924884088B354C/image-dimensions/273x253?v=v2 "SCR-20240505-kzez.png")  

Hopefully this gives you a good starting point on this workaround  

NOTE: You need to have transitions back and forward on all status you want the above method to work on still, they can all be hidden from users still.   

Cheers,  

Patrick Tripodi  
GLiNTECH

comments: author: Daniel Blomqvist
body: Hi [@Patrick Tripodi](/t5/user/viewprofilepage/user-id/5452664)

Thank you very much for that detailed answer and workaround.

I think this is a bit more complex than we would like it to be, but I really appreciate the level of detail.


Tags: cloud

jira-service-management

jira-service-management-cloud
Sending mail to group-adress via automation
Asked by lh_2023:

Hi there,

following situation: I have a group-picker field and want to send an email to the group when the field has changed. I know how to do this via automation.

But: The email does not go to the group itself (e.g. an email to each user) but to one specific mail adress for each group. So I have a 1:1-mapping group-mailadress.

How can I solve this without using plenty of Else-If-Parts in my automation?

Thanks a lot!


Answers:
author: Patrick Tripodi
body: Hi,   

How are you controlling the mapping of the 1:1? How are you matching Group A to Group As email address?   

Cheers,  

Patrick Tripodi  
GLiNTECH


Tags: data-center

jira-service-management

jira-service-management-data-center
Visual Issue with JSM
Asked by Nermin Dolic:

As of yesterday (5/2/24) I have noticed that just on my laptop when scrolling down to the bottom of the page, there is an additional white space that shows a gap of nothing but just white blank space. Is any else experiencing this issue?

![blankk.png](/t5/image/serverpage/image-id/321831i0655EC9F678BC182/image-size/large?v=v2&px=999 "blankk.png")


Answers:
author: Dan Breyen
body: Hi [@Nermin Dolic](/t5/user/viewprofilepage/user-id/5489619) welcome to the community. I'm not experiencing the same thing that you have. Does that ticket only have 3 responses? Does it display differently for someone else on that same ticket? What happens if you use a different browser on your laptop?

It might be a browser setting. I know Jira doesn't like zoom levels different that 100%.

comments: author: Nermin Dolic
body: [@Dan Breyen](/t5/user/viewprofilepage/user-id/5086375) I just tested in Edge and it's doing the same thing there. I do use 80% on my zoom size as I don't like the text and dashboards appearing too big for me. Odd that it just started as of yesterday though. Before that, I was always using 80% zoom and never had the issue before. I know others on my team have reported the same thing, just not sure if they are using the same zoom % as me.


author: Dan Breyen
body: [@Nermin Dolic](/t5/user/viewprofilepage/user-id/5489619) if you've tried setting your browser to 100% and it still is a problem, as you have a Cloud Premium license, you can open case with [Atlassian Support](https://support.atlassian.com/contact/?support_type=customer&inquiry_category=#/) and have them chime in.

I took a quick look at [Atlassian's Jira site](https://jira.atlassian.com/secure/Dashboard.jspa) and didn't find anything open.


author: Nermin Dolic
body: [@Dan Breyen](/t5/user/viewprofilepage/user-id/5086375) Just tried with 100% zoom and still doing the same thing for me.


author: Grant
body: Same for me - full screen or not

ticket logged


Tags: cloud

jira-service-management

jira-service-management-cloud
How to process a String using parameters? for e.g. string.abbreviate(null, 6)
Asked by mateus_oliveira:

I have an automations that uses a JQL query that looks like this:  

{{issue.Selection Field.value.toUpperCase().abbreviate(8)}}

It works absolutely fine. However, it ends up leaving the "..." at the end, so I did some search and found out that 'abbreviate' can be used with different parameters, so {{abbreviate(string, null, 8)}} would leave just the abbreviation. But is it possible to use these parameters when processing/treating strings - meaning, when using this command at the end of the string.

It seems I can't use {{abbreviate(issue.Selection Field.value.toUpperCase()), null, 8}} nor anything like that, I tried some variations and I only got errors...

I'm using Jira Server. Thanks!


Answers:
author: Kalyan Sattaluri
body: Hello [@mateus_oliveira](/t5/user/viewprofilepage/user-id/5372025)

Can I ask what are you trying to do?

Do you want to remove the 3 dots from the abbreviated string?

If so, if you are supplying length to abbreviate, you can also account for the 3 dots and pass the left function like below... {{issue.summary.toUpperCase().abbreviate(8).left(5)}}

Sorry if I am missing something, please clarify.

comments: author: mateus_oliveira
body: That's REALLY smart. The ending result is exactly what I was looking for, thank you so much!

Still curious if there's anyway to use parameters in this type of processing, but my immediate need was solved!


author: Kalyan Sattaluri
body: I am not familiar with the abbreviate parameters, will take a look as well and update if I find anything. However, if you want continue to do further processing or comparison, you should be able to continue appending additional [text](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/) functions to what you have including match function etc... Will keep you posted on what I find as well.. If your issue is resolved, please consider accepting solution. Thanks!


Tags: automation

jira-service-desk-data-center

jira-service-management

jira-service-management-data-center

jql

string
how to capture the specif text from Email body / Description to Custom field using Jira automation
Asked by Kishor Mudhili:

how to capture the specif text from Email (Descrption to Custom field using Jira automation

example:

Weekly check completed with faults:

**Room** : STA Meeting Room  
**Location:** Stallingborough

from the above Email (Description) i want to capture Room Information (example: STA Meeting Room) and should be updated in Jira Custom Field (Room), using Jira Autoamtion rules. please help me

i have tried with automation rules but not working. i have checked few articals but not working for me.

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


Answers:
author: John Funk
body: Hi Kishor,

Can you share a screenshot of the audit log for when it runs and what your log action shows?


author: Patrick Tripodi
body: Hi Kishor,   

You can try the following. {{Issue.description.substringBetween("Room: ", "Location: ")}}  

This will retrieve STA Meeting Room. You can also add .trim to remove trailing white spaces so {{Issue.description.substringBetween("Room: ", "Location: ").trim}}  

Cheers,  

Patrick Tripodi  
GLiNTECH


Tags: cloud

jira-service-management

jira-service-management-cloud
Disable all Assets imports with script
Asked by Eugeny Chernyavsky:

Hi Community,  
We have a lot of configured scheduled Assets imports running everyday several times due day  
If we need to disable them temporarily - we would like to avoid going through dozen of ObjectSchemas and disable manually more then hundred of imports  
question is: is there a possibility to disable them all at once  

I tried to use class com.riadalabs.jira.plugins.insight.channel.external.api.facade.ImportSourceConfigurationFacade:  

```
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.onresolve.scriptrunner.db.DatabaseUtil
import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ImportSourceConfigurationFacade
@WithPlugin('com.riadalabs.jira.plugins.insight')
@PluginModule ImportSourceConfigurationFacade importSourceConfigurationFacade

//getting list of all imports from database directly
```

```
DatabaseUtil.withSql('Imports') { sql ->
// going through each row of defined SQL query

  sql.eachRow("""SELECT SRC.NAME, SRC.ID FROM JiraDB.jiraschema.AO_8542F1_IFJ_IMPORT_SRC AS SRC ORDER BY SRC.ID ASC""") {
  def importID = it.getAt('ID') as Integer //Import ID
  def importSource = importSourceConfigurationFacade.loadImportSource(importID)

  def disabledImportStatus = importSource.importSourceStatus.createDisabled()
  importSource.setImportSourceStatus(disabledImportStatus)
  //log.warn(importSource.importSourceStatus)

 log.warn("Import Name: "+importSource.getName()+"; Import ID: $importID; Enabled: "+importSource.isEnabled())

 }

}
```

Script is running and giving goal result for ImportSourceStatus = false  
but imports remains enabled in UI and in DB


Answers:
author: Peter-Dave Sheehan
body: The importSource only exists in memory within the script context

You have to store it back after setting the status.

```
importSourceConfigurationFacade.storeImportSource(importSource)
```

comments: author: Eugeny Chernyavsky
body: Thanks,  
I missed that somehow. It works now  
Added this command and condition for importSource.isEnabled() not to update every import objects


author: Eugeny Chernyavsky
body: Just to add for future references:  
We found out that there is hidden PUT API request can be used to disable imports:  
https://{JIRA-URL}/rest/insight/1.0/importsource/{import_ID}/disable


author: Eugeny Chernyavsky
body: deleted


author: RobertRipple
body: It seems like the script is correctly updating the import status in the database, but it's not reflecting in the UI. Ensure that you're committing the changes to the database after updating the import source status to ensure they take effect.


Tags: assets

data-center

jira-service-management

jira-service-management-data-center

script

scriptrunner
Can't get JSM API call to work
Asked by Marius Vollrath:

Originally, I was trying to automize Opsgenie alert linking to JSM incidents, following this guide: [Auto Link Alerts to Jira Service Management Incide... - Atlassian Community](https://community.atlassian.com/t5/Jira-Service-Management-articles/Auto-Link-Alerts-to-Jira-Service-Management-Incidents/ba-p/2418247)

The final step kept failing because of an authentication issue, so I started troubleshooting it by trying a simple API call:

https://%company%.atlassian.net/rest/api/2/issue/%issue-key%

Authorization: Basic \<base64 encoded api key\>

Content-Type: application/json

I'm using Postman for this and put the values in the appropriate fields.

I followed the guide here for the authorization topic: <https://developer.atlassian.com/cloud/jira/service-desk/basic-auth-for-rest-apis/#supply-basic-auth-headers>

I created the API key with my user in the Atlassian Admin section and base64 encoded it using Powershell and the format myemail:apikey etc.

Still, I'm getting the error that either my supplied issue key doesn't exist or I'm not authenticated.

What am I missing?

Thanks!


Answers:
author: Patrick Tripodi
body: Hi Marius,   

You need to use an API Token instead of an API Key when using the Jira api.

You can generate one here: <https://id.atlassian.com/manage-profile/security/api-tokens> and then encode that and try again.

Cheers,  

Patrick Tripodi  
GLiNTECH

comments: author: Marius Vollrath
body: Hi Patrick

That did the trick! Thanks!

Best Regards

Marius :)


Tags: cloud

jira-service-management

jira-service-management-cloud
Migration of On-prem Bitbucket to cloud with LDAP Integration
Asked by cm devops:

We currently have an organization account with Jira using SSO and want to migrate our on-premise Bitbucket to the cloud while still utilizing our LDAP on the LAN. Do we need to create a new account for our organization in Bitbucket, and what are the recommended methods to secure the LDAP channel between Bitbucket and our LDAP server?


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

SAML SSO is possible in Bitbucket Cloud if you have an Atlassian Access subscription.

You can see the identity providers we support for SAML SSO on the following page, in the section **Single sign-on**:

* <https://support.atlassian.com/provisioning-users/docs/supported-identity-providers/>

The following documentation has more info on how to configure SAML SSO:

* <https://support.atlassian.com/security-and-access-policies/docs/configure-saml-single-sign-on-with-an-identity-provider/>

If you already have an Atlassian Access subscription and if you have configured SAML SSO for your domain, then any Bitbucket Cloud users with an email from your domain will also be redirected to your identity provider when logging in. There is no need for extra configuration.

User provisioning is not possible with Bitbucket Cloud yet. This feature is on our roadmap:

* <https://www.atlassian.com/wac/roadmap/cloud/shared-user-management?p=dbe4af1e-48>

Any updates will be posted in the open feature request we have about this: <https://jira.atlassian.com/browse/ACCESS-621>

You can add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

If you use the Bitbucket Cloud Migration Assistant to migrate, your users will be migrated as well. However, you will need to set up user groups and permissions after the migration.

Below are some resources for migrating with the Bitbucket Cloud Migration Assistant:

* <https://support.atlassian.com/migration/docs/bitbucket-cloud-migration-assistant/>
* <https://support.atlassian.com/migration/docs/after-migrating-to-bitbucket-cloud/>

Please feel free to reach out if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Can't clone via vscode due to Authentication failed
Asked by Iddo Goren:

Hi all,

I have installed VSCode on my mac, trying to clone a project.

I have created an access token, with all the permissions turned on.

(Repository Settings-\>Access Tokens)

When I click Clone in VSCode, it asks for the URL, I enter it.

When it asks for the password, I enter the access token provided by bit bucket.

I always get Authentication failed.

Is there anything more I need to do?

Thanks.


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

What URL are you using for cloning the repo?

When using a Repository Access Token, you need to use the following URL:

```
https://x-token-auth@bitbucket.org/workspace-id/repository.git
```

where **workspace-id** and **repository** replace with the values of the workspace-id where this repo belongs and the repo slug.

Documentation for reference: <https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/>

Using a URL like *<https://username@bitbucket.org/workspace-id/repository.git>* or *<https://bitbucket.org/workspace-id/repository.git>* is not going to work with the Repository Access Token.

Are you able to clone the repo this way?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
My files are not committing, although I have perhaps 50 or more changes.
Asked by Mary Anne Fusco:

I started a new repository and everything was going fine. until I copied some files from a previous project. This seemed to cause the confusion, because only a handful of files would commit. Besides that, I tried to push some files and got this error:

Updates were rejected because the tip of your current branch is behind  
hint: its remote counterpart. Integrate the remote changes (e.g.  
hint: 'git pull ...') before pushing again.  
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Everything says I am up to date, but I am not. Honestly If it can be done, I'd delete prior commits and just dump the whole project on my local machine onto the remote server, then start committing from there on in. Please help! I am new at this, so pardon my ignorance. Thanks in advance!


Answers:
author: Aron Gombas _Midori_
body: The message you are seeing...
> Updates were rejected because the tip of your current branch is behind

...means that the remote branch has commits that you local branch doesn't. Therefore, you can't push to the remote branch.

Solution: first pull from the remote branch, then it may merge with your local changes (it can even conflict with those), but finally you will be able to push.

If you used the commandline client:

```
> git pull
...
> git push
...
```

comments: author: Mary Anne Fusco
body: thank you. It won't accept my authentication, and an entire folder is not commiting. It is not in gitignore. I will accept your answer for that error message. Thanks!


Tags: bitbucket-cloud

cloud
How to recover deleted remote branch?
Asked by Amit:

Hi Team,

Do we have any way to recover a deleted remote branch?

The branch was deleted two years ago.

Regards,

Amit Kumar


Answers:
author: Theodora Boudale
body: Hi Amit,

I'm afraid that we don't have backups that far back and the garbage collections that run on the repository will have removed any dangling commits from two years ago.

The only way to recover would be from a clone of the repo where the branch is still present.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to list open PR for a branch using API
Asked by sidhant:

i was trying to get the list of open pull request for a branch. i tried hitting this API

GET /2.0/repositories/{username}/{repository_slug}/pullrequests?state=OPEN\&source.branch.name={branch_name}  

i got this response:   
{"type": "error", "error": {"message": "Your credentials lack one or more required privilege scopes.", "detail": {"required": \["pullrequest"\], "granted": \["repository:delete", "repository:admin", "repository:write"\]}}}  


Answers:
author: Aron Gombas _Midori_
body: The message means that whatever authentication you used, it is not permitted to work with pull requests.
> "required": \["pullrequest"\]

...means that you need the "pullrequest" scope to make this REST API call.

comments: author: sidhant
body: yeah but I already have admin access for this but still it is not inheriting all the write access


Tags: bitbucket-cloud

cloud
Can I use Bitbucket in China?
Asked by Liveconnect MediaLab_:

We have plan to develop web service for china(development team is in other country).

We are also going over the Cloud like Alibaba Cloud, Tencent or AWS China.

With Cloud service for china, can we use source code in Bitbucket?

And is there any problem?


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

Yes, Atlassian Cloud is usable in China.

You may encounter problems with the great firewall though - that can block your access if the government decide to include an Atlassian IP address for some reason. I don't have numbers, but it does feel like that is happening a lot less often than it used to.

If you sign up from China, it is likely that your system will be created and run from Singapore


Tags: bitbucket-cloud

cloud
Restore broken links after Bitbucket migration
Asked by Francisco Villena:

Hello

I wonder to know if there are any type of support from Atlassian in the case that after a Bitbucket migration from server to cloud the links between Jira and Bitbucker were broken.

Does Atlassian provide with any type of support in order to restore the broken links to the news ones?

In case this support were not provided, what it is the best approach to get it done?

Thanks!


Answers:
author: Patrik S
body: Hello [@Francisco Villena](/t5/user/viewprofilepage/user-id/4575677) and welcome to the community!

Integrations with other systems, such as JIRA, are not automatically migrated to Bitbucket Cloud.

You will need to set up these integrations again after the migration is complete. This can be done following the instructions of the below articles, depending on where your Jira is currently hosted :

* [Connect Bitbucket Cloud to Jira Cloud](https://support.atlassian.com/bitbucket-cloud/docs/connect-bitbucket-cloud-to-jira-software-cloud/)
* [Connect Bitbucket Cloud to Jira Server](https://support.atlassian.com/bitbucket-cloud/docs/connect-bitbucket-cloud-to-jira-software-server/)

After connecting Jira with your Bitbucket Cloud workspace, as long as the issue key in Jira is still the same, all the links on commits will be automatically refreshed to point to the connected Jira instance.

Thank you, [@Francisco Villena](/t5/user/viewprofilepage/user-id/4575677) !

Patrik S


Tags: application-link

bitbucket-cloud

cloud