youngmon/atlassian-qna huggingface dataset:
JMWE - Post function conditional Execution based on SLA being active
Asked by Stephen Dyball:

Hello!

This is a strange one to word, so apologies if it makes zero sense!

I am working on creating a post-function that sends a comment in a request, but I only want the comment to be posted if no SLA is active (The SLA information is "Due Date" or customfield_13779)

I have tried various iterations of: {{issue.fields.customfield_13779.completedCycles.breachTime == NULL}} and {{issue.fields.customfield_13779.remainingTime == NULL }} and {{issue.fields.customfield_13779.remainingTime.friendly \> 1m }}

But had no luck so far as the nunjucks always returns True, regardless of SLA being active or not, so I'm clearly looking at this at the wrong angle. I have taken a dump of the field while the SLA is active vs when it is inactive:

**++Active SLA++**

"id": "243",  
"name": "Due Date",  
"_links": {  
"self": "<https://jirajirajirajira.atlassian.net/rest/servicedeskapi/request/415715/sla/243>"  
},  
"completedCycles": \[\],  
"ongoingCycle": {  
"startTime": {  
"iso8601": "2024-02-19T15:35:29+0000",  
"jira": "2024-02-19T15:35:29.174+0000",  
"friendly": "Yesterday 3:35 PM",  
"epochMillis": 1708356929174  
},  
"breachTime": {  
"iso8601": "2024-03-04T15:35:29+0000",  
"jira": "2024-03-04T15:35:29.174+0000",  
"friendly": "04/Mar/24 3:35 PM",  
"epochMillis": 1709566529174  
},  
"breached": false,  
"paused": false,  
"withinCalendarHours": true,  
"goalDuration": {  
"millis": 288000000,  
"friendly": "80h"  
},  
"elapsedTime": {  
"millis": 8508034,  
"friendly": "2h 21m"  
},  
"remainingTime": {  
"millis": 279491966,  
"friendly": "77h 38m"

++**Inactive SLA**++

"id": "243",  
"name": "Due Date",  
"_links": {  
"self": "<https://ocadosupport-sandbox-587.atlassian.net/rest/servicedeskapi/request/415716/sla/243>"  
},  
"completedCycles": \[\]

Any help would be greatly appreciated!

Kind Regards,

Ste


Answers:
author: Reshma Begum {Appfire}
body: Hi [@Stephen Dyball](/t5/user/viewprofilepage/user-id/5350356) ,

Please add a conditional execution as below:

```
{{issue.fields.customfield_13779.ongoingCycle != null}}
```

To check if the SLA is active.

Hope this helps!

Thanks,

Reshma

comments: author: Stephen Dyball
body: Hey [@Reshma Begum {Appfire}](/t5/user/viewprofilepage/user-id/2278129)

Thank you for this - worked a treat! I just had to change this over to "== null" for my use case - you've saved me a headache! :)

Thanks again!

Ste


Tags: cloud

jira-service-management

jira-service-management-cloud
How can we add read-only field on customer portal.
Asked by Rupali Mohanty:

Can we add read only field on customer portal


Answers:
author: Nikola Perisic
body: Hello [@Rupali Mohanty](/t5/user/viewprofilepage/user-id/5401929)

Yes you can, you can refer to this page right here: <https://community.atlassian.com/t5/Jira-Service-Management/Print-Text-field-read-only/qaq-p/1730468>


Tags: cloud

jira-service-management

jira-service-management-cloud
Mail handler for JSM Service Desk ?
Asked by Oliviu Nita:

Hi guys,   
I have received a request from one of my coworkers, he ask me to create a mail handler in Jira that made actions on Jira Service Desk... i'm not found how i could configure this, here are his request:  

\<\<Could you please give me a Jira mailbox where :

- the mail creates a ticket in Service desk Project (JSM)  
- a mail with the ticket reference in the subject adds the mail as a comment  
- the first person in CC of the mail is set as "assignee" and the other cc's are set as "watchers".  
This is a standard mail handler, so there shouldn't be too "buggy"\>\>

Thanks in advance for answer/possible solution :D

Cheers !


Answers:
author: Marc - Devoteam
body: Hi [@Oliviu Nita](/t5/user/viewprofilepage/user-id/544641)

You can setup mail handlers in the system, mail section and the option incoming mail.

You need to be a Jira Administrator to be able action on this.

comments: author: Oliviu Nita
body: Hi [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976)

Thank you for fast reply.

I know that i can setup mail handlers on System/Incoming mail, i have a few running :)  
My question is: how to configure a email handler that create a issue in our JSM project with the setup as described, the mail handlers for JSM (Service Desk) is diff?rent from other project types, if i remember correctly :D

Thanks !


author: Marc - Devoteam
body: Hi [@Oliviu Nita](/t5/user/viewprofilepage/user-id/544641)

You can still use them but not for customers who are sending email, only for internal purpose.

JSM can only have a single request type bound to a email address, this to be used to create requests that are visible on the portal for the requesting customer.

So if this would be needed for portal facing issues, then Yes, only a single request type can be set to use the JSM handler on the JSM project.


author: Oliviu Nita
body: Ok, so to wrap up...

There is NOT possible to create a Mail Handler for Jira Service Desk (JSM) that do those actions:  
- the mail creates a ticket in Service desk Project (JSM)  
- a mail with the ticket reference in the subject adds the email message as a comment  
- the first person in CC of the mail is set as "assignee" and the other cc's are set as "watchers".  
This is a standard mail handler, so there shouldn't be too "buggy"

Could you confirm that [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976) ?

Thanks a lot for your time !


Tags: jira-service-desk-data-center

jira-service-management

jira-service-management-data-center

jira-service-management-server

server
jira??????????????????????????????????????????????
Asked by Neroli:

jira??????????????????????????????????????????????????????????????????????????????????


Answers:
author: Brant Schroeder
body: [@Neroli](/t5/user/viewprofilepage/user-id/5433528) Welcome to the Atlassian community

I am assuming that you have an app that has a dashboard macro and not everyone is licensed to use it. I would suggest talking to the dashboard owner and seeing what the macro is and what app it is associated with. You can then figure out how it is licensed and add people.


Tags: jira-service-management

jira-service-management-server

server
Email auto create ticket to specific request type
Asked by Mark Aca-ac:

Hi Everyone, I hope you can give me insights into what I am trying to achieve.  

<br />

Scenario is,  

I am receiving emails from one of my team, like  

<br />

from: john@gmail.com  
Subject: Weekly Task  

<br />

<br />

<br />

Now, in our JSM, I have a request type consisting of  

<br />

General Support  
Device Request  
IT Service Task  
Onboard  
Offboard  

<br />

I want that email I received to automatically forward and create a ticket specifically under IT Service Task.  

<br />

I hope someone can give me some links or docs I can follow on this.  

<br />

<br />

Thank you in advance!  

<br />

<br />

<br />

<br />

Regards,  

<br />

Mark  

<br />

<br />

<br />

<br />

<br />

<br />


Answers:
author: Brant Schroeder
body: [@Mark Aca-ac](/t5/user/viewprofilepage/user-id/5433487) welcome to the Atlassian community

You can forward the email to the service desk email and use automation to assign it. It would be easier to just have them send it to the service desk or use the portal.

comments: author: Mark Aca-ac
body: [@Brant Schroeder](/t5/user/viewprofilepage/user-id/769100) , thanks for the comment.  

The current set up is that, when the HR created a new user in our HRIS, I will receive an email for it.  

Since I received that email, I have been thinking that if there is a way we can do to automate, like, once I receive that email, it will automatically forward that email to JSM, under the category of "Onboard".  

<br />

Thanks,  

Mark Aca ac


author: Brant Schroeder
body: [@Mark Aca-ac](/t5/user/viewprofilepage/user-id/5433487) you can create a rule in your email client to do that. Or you could just have them send it to Jira. Could they add it to the email notifications from HR.


Tags: cloud

jira-service-management

jira-service-management-cloud
406 error when executing PowerAutomete
Asked by ?????:

I would like to use PowerAutomete to link a task to JIRA when an item is added to the SharepointOnline list.  
The flow we want to link is in the PowerAutomete template, so we created the flow using the template.

<br />

The authentication type to JIRA is Oauth authentication,  
When I actually test run the PowerAutomete flow, it returns the following 406 code and an error occurs.  
Please let me know how to resolve the error.

{  
"error": {  
"code": 406,.  
"message": "Please Use New version of Action with this connection", { "source": "japan-auth  

<br />

<br />

"clientRequestId": "ecdb0b15-6d0d-4310-b158-09b2b1324049"  
}  
}


Answers:
author: Joseph Chung Yin
body: [@?????](/t5/user/viewprofilepage/user-id/5433444) -

Welcome the community. Since PowerAutomate (I believe it a part of Microsoft) a third party integration tool, you need to contact the vendor for further technical support.

You can also contact Atlassian Support (<https://support.atlassian.com>) for possible further assistance on this matter.

Sorry.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

comments: author: ?????
body: Thank you very much.  
Correspondence.

Fujita


Tags: cloud

jira-service-management

jira-service-management-cloud
Time to First Response time showing on report for excluded ticket type
Asked by Bryce L:

Hi everyone,

I have a weird issue where the time to first response time is being reported on for a ticket type that is already excluded in the SLA (JQL).

Wondering if anyone has any insight into why?

This is the JQL in the SLA exclusion:

"Ticket category" in ("Service requests", incidents) AND priority = Urgent AND "Request Type" not in ("Moves (SD)", "Site Transfer (SD)", "Travel (SD)", "Parental / Extended Leave of Absence (SD)", "New Starter (SD)", "Role Change (SD)", "Leaver (SD)", "New External Account (SD)", "Request Decommission of Equipment (SD)", "External Visitor (SD)")

But tickets logged as External Visitor (SD) are still showing in any report associated with Time to First Response.


Answers:
author: Marc - Devoteam
body: Hi [@Bryce L](/t5/user/viewprofilepage/user-id/3926041)

Could be that the request has been renamed, then the old request name could be still in the DB as reference or is this request type has been in one of the Ticket Categories and has been removed later on, also that reference could still be in the DB.

If you create a new Request Type for this one and then check is the SLA ok?

If tis is the case its definitly still in the DB somewhere, you should reach Atlassian Support to have them check as they only have access to the instance backend


Tags: cloud

jira-service-management

jira-service-management-cloud
Artifacts controll between steps
Asked by Alexey Bulenkov:

Hi. Have a question about artifacts control between stages. I have pipeline which have these steps:  
- build using test environment  
- run tests using "build/\*" artifacts from previous step  
- deploy "build/\*" artifacts on test stage  
- build using prod env and save "build/\*" artifact  
- manual deployment "build/\*" artifacts to production

The problem that artefacts was merged in final step, but I need only artifacts from production build. I try to use option "artifacts download: false" - but it's not help. I know that I can save artifacts in builds/dev and builds/prod - but for that I need add extra steps and after that pipeline seems ugly and overloaded.


Answers:
author: Theodora Boudale
body: Hi Alexey,

I'm afraid that this is not possible to achieve at the moment. All artifacts that are created in a step are available to all the following steps, and if you don't disable artifact download for a step, then all artifacts will be downloaded.

One way to work around this would be by generating the artifacts of step 1 and step 4 in different directories, as you mentioned. Another option would be to use two different custom pipelines, one for the first three steps and another one for the other two steps. Please keep in mind though that custom pipelines can be manually triggered or scheduled, they do not run automatically.

We have a feature request for preventing a step from downloading specific artifacts:

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

If this is something you'd be interested in, I would suggest adding your vote to the feature request (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Bitbucket runners don't share tasks
Asked by Alexey Bulenkov:

Hi. I have to self-hosted runners with equal tags. But tasks run always only on last instance. I often see than pipelines stay in queue and don't see any activity on first instance.

Does bitbucket support the distribution of tasks to free runners?


Answers:
author: Ben
body: Hey Alexey,

Yes - builds will automatically execute on runners when they are considered "free" and no other jobs are running on them. This allows for redundancy.

There is a bug at present that is causing builds to not become unassigned from runners, and therefore these are considered "busy" and will not accept further jobs.

This is under investigation with a high priority with our developers, you can "Watch" this issue for future updates:  
<https://jira.atlassian.com/browse/BCLOUD-22300>

In the meantime, I would suggest deleting and re-adding the runner where jobs are not executing - this will allow new builds to run on this runner.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Alexey Bulenkov
body: [@Ben](/t5/user/viewprofilepage/user-id/4537226) seems it's not our bug. We have auto-update script, which pulled new image of bitbucket-runner and reload docker container every night. But we have same problems - to much queue jobs and activity only on one runner.


author: Ben
body: Hi Alexey,

You will need to ensure each runner has the same tag present and this tag is referenced in the bitbucket-pipelines.yml - when Bitbucket Cloud pipelines looks for runners to execute on it will try any of the non-busy runners with these tags present.

For example if two runners have the following tags:

```
self-hosted, linux
```

When calling the runner, the bitbucket-pipelines yml will need to have both tags listed - it should then recognise that multiple runners are present with these tags and therefore both can have the build step executed on them.

Again, if you have already ensured the above is implemented - and one of your runners is still not being used - you will need to delete and re-add it so that the job queue is cleared, and builds may execute on it due to the bug I mentioned previously.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How to include files on service containers
Asked by Ben Zuill-Smith:

I have a seed script that I want to run on a mongo service container for use in my repo's Pipelines. The mongo image can automatically run scripts if provided in a special folder. Is there a way to provide this from my repo code or do I need to create and publish a docker image that includes the seed script(s)?


Answers:
author: Ben
body: Hi Ben,

Yes, you are able to provide the scripts in the repository source, as when you perform a build - it will clone the Bitbucket repository as your working directory. This then allows you to navigate to this folder and execute scripts.

You could also create a docker image, however, you would need to push changes to the docker image whenever changes to the scripts are made vs simply committing these changes into the repository.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: dev
body: Hi Ben,

I can access the repository files from the script section of a pipeline step. But how can I mount a folder or a file in my repository as a volume on a service container?

Thomas


author: Ben
body: Hey Ben,

Unfortunately, you are unable to mount volumes in Docker aside from the Bitbucket clone directory as this command has been restricted for security reasons due to requiring root privileges (see: Running docker commands heading)

<https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/>

Another user has raised a request to remove this restriction, you can "Watch" this feature request to receive updates related to it and "Vote" for it to increase its visibility in regard to customer demand:

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

I have found this community post suggesting solutions for mapping the clone directory below:  
<https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-pipelines-does-Docker-volume-mounting-work-yet/qaq-p/703455>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Request to provide an access
Asked by fathima_abdul_hameed:

Unable to clone the objects. please provide full access


Answers:
author: Vedant Kulkarni
body: Hi [@fathima_abdul_hameed](/t5/user/viewprofilepage/user-id/5100082) , you landed on the wrong location for such queries. Please reach out to your workspace admin or raise a request with Atlassian support - [Atlassian Support](https://support.atlassian.com/)


Tags: bitbucket-cloud

cloud

sourcetree
Is bitbucket server free to use for small company size?
Asked by Ayush Pareek:

We want to use bitbucket server product which we will manage on our own company server. I want to understand that it is free to use up to a user limit or it require a license to purchase.


Answers:
author: Vedant Kulkarni
body: [@Ayush Pareek](/t5/user/viewprofilepage/user-id/5100070) You can no longer purchase or request a quote for a new Server product. However, you can opt for Bitbucket DC(single-node) which works similarly to the bitbucket server, and start with the **30-day free trial** . Later, you will have to purchase a Bitbucket DC license based on your user count. You can check the Bitbucket pricing here [Bitbucket - Pricing \| Atlassian](https://www.atlassian.com/software/bitbucket/pricing?tab=self-manageddata-center)


Tags: bitbucket-server

server
looking for CD/CI solutions for testing firmware on physical hardware
Asked by Josiah Brough:

Currently using bitbucket webhooks with Jenkins controller-agent framework to test firmware, which is working well but looking for a more modern, integrated and secure solution. From what I've read, the bitbucket pipelines functionality is more catered for cloud testing services.

For more of an understanding of what I'm trying to achieve:

\[push / pull-request\] -\> \[repo cloned to a local machine\] -\> \[testing firmware on physical device\] -\> \[test results available on bitbucket pipelines\]

These firmware tests could take longer than 120 mins therefore self hosted runners are not an option.

<br />

Any suggestions are greatly appreciated.


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

Having the test results available on the Bitbucket Pipelines page is only possible with Pipelines that run in our own infrastructure or with Pipelines runners (in your own infrastructure).

We have a feature request for the ability to extend the execution time beyond 120 mins for self-hosted runners:

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

If this is something you'd be interested in, I would suggest adding your vote to the feature request (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

I also wanted to mention that the 120 mins limit applies to each step of the pipeline and not to the whole build. In case you're running e.g. 5 commands and each of them completes in less than 120 minutes, you could divide them into separate (possibly parallel) steps with a runner.

Kind regards,  
Theodora

comments: author: Josiah Brough
body: Hi Theodora,  

Thank you for your help! Are you able to say on average how many votes a feature is required to have before it is considered? Just trying to decide on whether or not we should be working with the self hosted runners in hope of this change or look for other options.  

Many thanks,  
Josiah


Tags: bitbucket-cloud

cloud

continuous-delivery
Can I use wildcards in bitbucket pipeline cache paths?
Asked by Paul Smith:

We have one project that is using a lerna mono-repo structure. For this I not only want to cache the top level dependencies, but also the package dependencies.

For this I need to be able to use a wildcard in the cache path such as:

```
definitions:
  caches:
    lerna: packages/*/node_modules
```


Answers:
author: Paul Smith
body: Use the following command to hoist the package dependencies to the root, in the bitbucket pipeline for your lerna mono-repo.

```
npx lerna bootstrap --force-local --hoist
```

Then wildcards will not be needed, and all node dependencies will be cached as normal.


Tags: bitbucket-cloud

bitbucket-pipelines

cache

cloud

lerna

node

npm
Keep cache after run of self-hosted Windows Runner
Asked by Marcel Schoch:

We run a self hosted CI machine using the windows runner. After a run, the cache folder seems to be deleted every time. Especially when a pipeline fails, it would be great to keep this cache for investigation purposes. Is there an option to disable the purge of the cache in case the pipeline does not complete successfully?

Cheers,

Marcel


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

Are you referring to the cache folder that is located in the same directory as the build folder, where the repo is cloned when a step runs? The runner always tries to clean these folders once a build finishes.

Where are you saving the cache? Is it in a directory inside the clone directory? With Windows Runners, we don't restrict where your cache folder is located, so you can store the cache in any directory of the device outside of the runner directory, and this way the cache will not get cleared.

Kind regards,  
Theodora

comments: author: Marcel Schoch
body: A simple solution indeed, thank you.


author: Marcel Schoch
body: A simple solution indeed, thank you.


Tags: bitbucket-cloud

cloud

server