youngmon/atlassian-qna huggingface dataset:
How do I enable Rich Text editing within Jira Assets attributes?
Asked by Caleb Youngblood:

I'm working within **Jira Assets** and am trying to create an attribute for an object that allows the user to input rich text information. This [Atlassian resource](https://support.atlassian.com/jira-service-management-cloud/docs/creating-attributes-for-it-asset-management-itam/) indicates that the field **Textarea** "contains a larger section of text with a maximum of one million characters, including line breaks and formatting. You can use the Assets rich editor to customise the content."

I have tested this field out, and there is no rich editor present that the user can access to customize the content. How is this enabled?


Answers:
author: Kevin Patterson
body: Hi [@Caleb Youngblood](/t5/user/viewprofilepage/user-id/5571637) - I believe the Atlassian document is incorrect in the description of a "rich editor". I've tried several different types of formatting and markup commands in TextArea and nothing seemed to work. There are a few older community posts that I've seen from time to time where this comes up and the community consensus is that TextArea is a plain text field. Some of these posts go all the way back to the days when Assets was called insights. here is an older post for reference: <https://community.atlassian.com/t5/Jira-Service-Management/Rich-Text-enabled-in-Textarea-attribute-for-Jira-Insight/qaq-p/2093078>

Out of curiosity can you share more details about your use case for this field to contain rich text vs plain text?

comments: author: Caleb Youngblood
body: Thank you for your response. Glad to hear that I'm not alone in this problem.

My use case is the following. We maintain 600+ objects and are all subject to testing procedures. I would like to create a field for documented test procedures that include bolded text, italics, bullets, and inline links. These test procedures would be relatively short (less than 250 words).


author: Kevin Patterson
body: I understand what you are trying to do, Having the inability to markup the text to highlight important details is not helpful. At the moment I can't think of a workaround that would allow you to have marked up test procedures short of writing the procedures in a confluence page and then referencing that confluence page as a link in an asset attribute (this is not ideal and will introduce more friction into your use case in my opinion). I looked for an enhancement in Atlassian's system and found one still open to enhance text area with a rich text editor but it was for data center <https://jira.atlassian.com/browse/JSDSERVER-8412> logged back in 2021.


author: Caleb Youngblood
body: Yeah, definitely. I did find one workaround right now to copy and paste HTML into the field using a text to html converter. Not pretty, but works.


Tags: cloud

jira-assets

jira-service-management

jira-service-management-cloud
I want to create an automation based on Issue type.
Asked by Adem Kaya:

Greetings atlassian community.  
I want to create an automation based on Issue type. For example, when a new issue is opened, the description field will automatically display the articles that I have determined. I can do this, but I want different messages to appear depending on the task issue type. If it is a bug record, the description should be different for those with this issue type. If it is a development task, different articles should appear. Currently, texts appear only when the issue is created, I cannot print differently in a specific task.  

<br />

<br />

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


Answers:
author: Holger R?sch
body: Hi Adem,

you can do this using a IF/THEN Condition after the trigger:

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

there you can check for the specific issue type

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

In the end you should have a rule like this![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/279492i7C4C7F13C224D708/image-size/large?v=v2&px=999 "image.png")

Hope this helps.

Best,

Holger

comments: author: Adem Kaya
body: This answer worked for me. Thanks


author: Sebastian Krzewi?ski
body: Hi [@Adem Kaya](/t5/user/viewprofilepage/user-id/5225050)

In trigger (WHEN) you cannot add condition). After WHEN please add branch and condition in each branch where you will limit to issue types that you need.  

<br />

Regards,

Seba
Automation rule to populate issue items in field called user record link
Asked by Priya:

Hello Team,

I am trying to create a automation rule when I am creating change issuetype I fill the custom field called Email Address where I put assignee's email address and I want the custom field User Record link to auto fetch the jira items that were assigned to the assignee.

Please let me know if it is possible, if so share the rule.

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


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

Automation for Jira rules trigger/run after an event has occurred. They do not run to populate fields on a view / form as the events have not happened yet. (For example, editing issue fields.)

If you have a need to dynamically populate fields based upon other fields, you may want to investigate marketplace addon apps to help with that.

Kind regards,  
Bill
Copy date field content to a datetime field without loosing the time
Asked by Rudy Holtkamp:

Hi all,

I'm trying to build an automation which copies the time from a date field (Start Time) to a datetime field (Start Time \[Gantt\]).

When I do this the easy way, it will remove the time set in the datetime field and the requirement is to keep the time.

I can extract the time before making the change and put them into variables, called hours \& minutes. But I can't add them to the datetime field.

I've an Edit issue component with Start Date \[Gantt\] (the datetime field) and the following smart value:

```
{{issue.Start Date [Gantt].withHour(hours)}}
```

I also tried

```
{{issue.Start Date [Gantt].withHour({{hours}})}}
```

But I keep getting the error:  
*Error rendering smart-values when executing this rule:*  
*Failed to get value for issue.Start Date \[Gantt\].withHour({{hours: {{issue.Start Date \[Gantt\].withHour({{hours}})}}*  
So how can I keep the time?


Answers:
author: David Leal
body: [withHour](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/) is expecting a number, did you check your {{hours}} variable stores a number? (for example isNumeric()) Please share your automation rule. Thanks
Cannot use max() with list of Objects
Asked by Evan Yeung:

Hi,

I'm getting a list of how many approvals are required for a list of apps using the Lookup Object command and logging the smart value with **{{lookupObjects.Approvals Required}}**

```
0, 2, 1
```

If I check the size with **{{lookupObjects.Approvals Required.size}}** I get "3" returned. But if I do **{{lookupObjects.Approvals Required.max}}** nothing is returned, I would expect "2" to be returned here.

I also tried **{{lookupObjects.Approvals Required.asNumber.max}}** in case it was being treated as text.

Is there anything specific with the list and Objects that's preventing me from getting the max?

Thanks


Answers:
author: Kesab Nandi
body: Please check this [Auto-populate approvers from Asset objects attributes \| Jira \| Atlassian Documentation](https://confluence.atlassian.com/jirakb/auto-populate-approvers-from-asset-objects-attributes-1072474097.html)

comments: author: Evan Yeung
body: Thanks Kesab. I was not able to find anything in the link about using the \`max()\` function, however the link did point me in the direction to solve something else I had (using the \`flatten()\` command).

I want to get the number of approvers to transition the issue to different statuses, each having a hardcoded number of approvers, since the number of approvers can't be set by variable.
Flatten a nested list
Asked by Evan Yeung:

Hi,

I am doing a Lookup Objects function to get all the roles that can be assigned to an app and get the approvers for the roles.

The output of **{{lookupObjects.Approvers}}** looks something like this

```
[5b2...579, 610...1f6], 610...1f6
```

and if I do **{{lookupObjects.Approvers.size}}** I get "2" returned, so it appears I have a nested list. I want to flatten this list so I can perform de-duping and set the Approvers field with the list of users.

I have tried split() and join() without much luck. And I also tried using a for each loop, but I seem to be running into a problem with order of operations.

Is there anything neat tricks I can do to flatten this list?


Answers:
author: Evan Yeung
body: Apparently there is a \`flatten()\` command, learned that in here <https://confluence.atlassian.com/jirakb/auto-populate-approvers-from-asset-objects-attributes-1072474097.html>.

That worked nicely, and then I was able to use \`distinct()\` on it to get my list of Approvers
Calculate a score based on values of custom fields
Asked by Dimos:

Hello!

I'm searching to find a way to create a scoring calculation within Jira. I was thinking if I could have e.g. 2 custom fields to represent a score for value and impact, would I be able to create an automation that would multiply those values and place the output on another custom field?

Many thanks in advance!


Answers:
author: Kseniia Trushnikova
body: Hi [@Dimos](/t5/user/viewprofilepage/user-id/5308386),

Sure, you can use math expressions in Automation. To get started, check out these docs:

* [Jira smart values - math expressions](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/)
* [Examples of using math expression smart values](https://support.atlassian.com/cloud-automation/docs/examples-of-using-math-expression-smart-values/)

Your expression will look something like this:  

```
`{{#=}}{{issue.Field1}} * {{issue.Field2}}{{/}}`
```

comments: author: Dimos
body: Hi [@Kseniia Trushnikova](/t5/user/viewprofilepage/user-id/4593830)

I can't thank you enough for your enormous help here!!!

I have created all the automations I needed and realised how much more potential is there!!

Many many thanks for your help!

Take care
Algu?m sabe como atualizae o Kanban, atrav?s de planilhas de cronograma do excel?
Asked by Vivian Mendes Moreira:

Preciso criar uma automa??o que me permita atualizar o kanban com 3 datas, Planejado/Replanejado e Realizado. Como essas datas variam de acordo como realizado da etapa anterior n?o funcionam com a automatiza??o de premissas, algu?m conhece alguma outra forma de realizar?


Answers:
author: Fernando Eug?nio da Silva
body: [@Vivian Mendes Moreira](/t5/user/viewprofilepage/user-id/5306917) , bem vinda ? comunidade Atlassian!

Voc? pode descrever melhor o seu caso de uso? Pergunto porque integrar o Jira para atualizar campos de acordo com uma planilha de excel acaba n?o fazendo tanto sentido no final do dia e pode ser bem muito mais complexo do que explorar outros recursos como o de Automa??es do Jira.

Pelo que entendi s?o 3 campos de datas: **Planejado** , **Replanejado** e **Realizado**.

Em que fase do ciclo de vida do card esses campos s?o/devem ser preenchidos? Se voc? puder dar mais detalhes, acredito que conseguimos chegar em uma solu??o usando o recurso de automa??o do Jira.

Aguardo seu retorno.

Atenciosamente,

Fernando :)
Difference between {#issues} and {lookupissues} --- Data Center
Asked by Kalyan Sattaluri:

A recent A4J release introduced {lookupissues} action..

Previously, I was able to access a trigger's JQL's result set using {#issues} and if I wanted, filter the result set or count or do other things..

I am not able to understand what the difference is between these 2 or when will lookupissues action be useful?

Atlassian documentation is not clear.. Can anyone share their thoughts or point me to any previous discussion on the same?


Answers:
author: Kian Stack Mumo Systems
body: [@Kalyan Sattaluri](/t5/user/viewprofilepage/user-id/5118323),

The benefit of the lookup issues action is that now you can lookup and iterate over issues outside of a scheduled JQL action.   

One example might be checking to make sure individuals aren't overworked. When an issue is assigned, you can use the lookup issues action to check to see how many open tickets that person has assigned to them. If it's greater than 5, you could add a comment alerting them and suggesting that they check their capacity.

Does that make sense?

comments: author: Kalyan Sattaluri
body: I see, yes def makes sense. Thanks Kian for the use case explanation!


author: Melissa C
body: [@Kalyan Sattaluri](/t5/user/viewprofilepage/user-id/5118323)

Sorry to jump on this old thread!  
You mentioned that you used {{#issues}} to filter the result set. How were you able to do this?  

I'm currently looking to combine two tables in an automated weekly email.   
I'm using one jql query, I want to be able to put all the Issuetype Epics on one table and all the Tasks on another. I'm able to create two table, but currently only able to get them in one table. I've tried the Issueslookup but can't figure how to only get Epics/Tasks.

Any help/ suggestions would be amazing?
If user changes the drop-down custom field values, the other date field values should be cleared out
Asked by Srinivsarao Mutyam:

Hello Community

If the user changes the drop-down custom field values, the other date field values should be cleared out.

Context: We need help making automation rules for below.

When the user changes one of the custom field (drop-down) values, the other custom field (date type) should be cleared out.

Note: Workflow statuses may be in any state from draft to closed.

Thanks in Advance


Answers:
author: Kseniia Trushnikova
body: Hi [@Srinivsarao Mutyam](/t5/user/viewprofilepage/user-id/5158022),

Here's the example. It's a simple rule with the trigger **Field value changed** and the action **Edit issue**:

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

Leave the field value box empty in the action **Edit issue**(just like on the screenshot). It will clear the field.

Please don't forget to replace my fields *Multiple choices* and *Due date* with your fields.

comments: author: Srinivsarao Mutyam
body: Thanks for prompt solutions. Its working fine,

I have a question regarding another rule that I created previously.

Scenario: When an Epic contains 4 stories, each with a different DUE DATE filled in, the most recent date should be copied to the Epic along with its linked CLI.

To extend this rule: If out of the 4 stories, one or two stories do not have the due date filled in, then the Epic and its linked CLI should not have their due dates filled in until all stories have their due dates filled.

Thank you


author: Darryl Lee
body: Hi [@Srinivsarao Mutyam](/t5/user/viewprofilepage/user-id/5158022) - this is a signficantly different question and I'd be happy to answer it if you can create it as a separate post.
How can we automate that once a Teams Meeting is done update the Confluence Space with Meeting notes
Asked by Danisse:

How can we automate that once a Teams Meeting is done update the Confluence Space with Meeting notes


Answers:
author: Avinoam
body: Love this use case! We've actually been playing around internally with something of the sorts and are looking into what we can offer in this regard in the coming months. No clear plans yet, but we'll absolutely keep you posted via the community, public tickets, and our public roadmap!

comments: author: Danisse
body: Thank you! But would you know atleast how we can integrate Virtual Assistant from Atlassian Intelligence to Jira Service Management?


author: Avinoam
body: For that I will ping the one and only [@Jensen Fleming](/t5/user/viewprofilepage/user-id/4058269) :)


author: Jensen Fleming
body: Hey [@Danisse](/t5/user/viewprofilepage/user-id/3441045)! the JSM Virtual Agent is now available for all! This product guide walks you through step by step setup: <https://www.atlassian.com/software/jira/service-management/product-guide/tips-and-tricks/virtual-agent#overview>


author: Danisse
body: Hi [@Jensen Fleming](/t5/user/viewprofilepage/user-id/4058269) yup went through this already :) and curious to when can we expect the functionality to integrate the Virtual Agent to Teams?


author: Jensen Fleming
body: Our immediate focus is optimizing the virtual agent for service teams that capture and resolve requests in Slack. We will begin work on supporting additional channels like Microsoft Teams shortly. Please keep an eye on the community and our public cloud roadmap for an update!
how to validate issue ID (JIRA ticket)
Asked by Jeevan Mahesha:

I have included a Jira ticket ID in all commit messages. To ensure the validity of this ticket (issue ID), I am seeking a method to perform validation. Could you kindly provide guidance on how to achieve this?  

Example:-

My Board name is ABC  
My Ticket (Issue ID) is ABC-105  


Answers:
author: Boldizs?r Vermes
body: [@Jeevan Mahesha](/t5/user/viewprofilepage/user-id/4445897), what do you mean by validation of a ticket? Do you want to know whether it exists or it exists on a given board or something else maybe?

comments: author: Jeevan Mahesha
body: yes i want to know ticket is exist / not


author: Boldizs?r Vermes
body: In this case, I would just add a condition to the rule: key in (ABC-123)

Use IF, ELSE component if you want to run different actions in both cases or use a simple JQL condition if you want to stop the automation in case of an invalid issue key.


author: Jeevan Mahesha
body: Thanks for your time [@Boldizs?r Vermes](/t5/user/viewprofilepage/user-id/5089142)
How do I automate the creation of sub-tasks with specific interdependencies for a given task?
Asked by Mourad Siala:

Hi all,

I am searching for a solution to automate the following:

I have a Task, let?s name it X. When I click on the automated button, JIRA creates a predefined list of Sub-tasks for X and creates as well a predefined list of (non-ASAP) outgoing and incoming dependencies between them.

Is that doable?


Answers:
author: Bill Sheboy
body: Hi [@Mourad Siala](/t5/user/viewprofilepage/user-id/5301776)

This seems to be a duplicate of your other question, linked below. Please close out this one to help the community focus on one thread. Thanks!

<https://community.atlassian.com/t5/Automation-questions/How-can-I-automate-the-creation-of-Sub-tasks-with-a-list-of/qaq-p/2461720>

Kind regards,  
Bill
Need to get Max value of field from linked issues
Asked by Sanjivani Wayal:

Hi,

I have and EPIC it has more than 4 issues (consider childisuses) linked to it with particular link name , all these child issues have different value in target pi's , i want the EPIC should take the max value from these values, i wanted to write the automation for the same.Not sure how to use MAX function for extracting value from linked issues


Answers:
author: Stefan Salzl
body: Hi [@Sanjivani Wayal](/t5/user/viewprofilepage/user-id/5142575)

Did you already try some solutions by your own? could you show how far you?ve come so far?

If you just starting with automation I reccomend to read through the basics and functionalities:  
<https://www.atlassian.com/software/jira/guides/automation/overview#what-is-automation>

Further question:  
Are you using structure or are those connections between epic and other issues casual epic-link (parent) connections?

When should the rule be triggered? (We only know about what should but not when and under which conditions)

Best  
Stefan

comments: author: Sanjivani Wayal
body: [@Stefan Salzl](/t5/user/viewprofilepage/user-id/4616993) I havent tried for this one , however in past i have created and automation to get max value in a field which was in same issue , but here i need to get the max value from other linked issue for which i didnt find condition which can pick values from related issues.


author: Bill Sheboy
body: Hi [@Sanjivani Wayal](/t5/user/viewprofilepage/user-id/5142575)

Adding to Stefan's answer:

If you can write a JQL expression to find the issues, you can use the Lookup Issues action in an automation rule...and then easily find the [maximum value for a field](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.max):

```
{{lookupIssues.someField.max}}
```

Please note this only works for numeric and date values. To get the last alphanumeric value for a sort order, instead try adding an ORDER BY to your JQL, and then use [last](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.last) on the results:

```
{{lookupIssues.last.someField}}
```

Kind regards,  
Bill
How to Commit Changes and Delete Files with Repository Access Tokens via REST API?
Asked by Mustafa Khaled:

Hi everyone,

I'm trying to automate some Bitbucket tasks using the REST API and **repository access tokens**, but I'm having some issues.

**Use Case:**

I am building a documentation project that will store files on Bitbucket, I need scoped access tokens that will have no access to any other repo on the same workspace. with zero user interactions, because I will not use Bitbucket Oauth, I will be using Google's

**What I'm trying to do:**

1. **Commit Changes:** I want to be able to programmatically create or update files in my repository using the token, but I'm not sure how to structure the requests or what endpoints to use.

2. **Delete Files:** I also need to be able to delete files remotely using the API and the token.

**What I've tried:**

* I've created a repository access token with the `repository:write` permission.
* I've looked through the Bitbucket API documentation, but the examples mostly use personal access tokens or OAuth. ( source endpoints )

**My Questions:**

* Can someone provide specific examples (preferably in curl) of how to use a **repository access token** to:
  * Commit new files to a repository
  * Update existing files
  * Delete files

Any help or guidance would be greatly appreciated!


Answers:
author: Theodora Boudale
body: Hi Mustafa,

You can provide the repository access token in the Authorization header as a bearer token when making requests to Bitbucket APIs, similar to an OAuth access token.

This is an example of committing a new file to the repo and also updating an existing file:

```
curl https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/src \
   -F fileA.xml=@fileA.xml \
   -F message="some commit message" \
   --header 'Authorization: Bearer token_here'
```

If the file exists in the repo, its content will be replaced with the content of the file you are uploading.

This is an example of committing a file's deletion:

```
curl https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/src \
    -F files=fileA.xml \
    -F message="some commit message" \
    --header 'Authorization: Bearer token_here'
```

You need to replace **workspace-id** , **repo-slug** , **fileA.xml** , **some commit message** and **token_here** with the respective values for your calls.

These calls will create the commits on the repo's main branch. If you want to specify a different branch, you can use **-F branch=test-branch** in your calls, where **test-branch** replace with the name of the branch.

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

Kind regards,  
Theodora

comments: author: Mustafa Khaled
body: Thank you bro , it did work


Tags: bitbucket-cloud

cloud