youngmon/atlassian-qna huggingface dataset:
Can I Filter Issue Scope on Jira custom field's Single Select in Cloud?
Asked by Jessie Chia:

I am trying to filter assets objects by a single-select custom field's value. Example:

* Location: Australia -- this is a single-select custom field
* Hardware: \<Assets custom field, list filtered by object type's attribute called "Location" the selected Location option value\>

Entering any of the following into the Filter Issue Scope field of Hardware's assets configuration kept giving me the error message "The AQL query contains one or more placeholder custom field IDs that are invalid or not Assets object fields. ":

* Location = ${customfield_XXXX}
* Location = ${customfield_XXXX.label}

![Screenshot 2024-07-19 at 10.02.27?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/336552iAD2D3146FE793788/image-size/large?v=v2&px=999 "Screenshot 2024-07-19 at 10.02.27?AM.png")  
Does Cloud only support placeholder of another Assets custom field? Is there a way to use a placeholder for a custom field?  
Thank you!


Answers:
author: Adolfo Casari
body: [@Jessie Chia](/t5/user/viewprofilepage/user-id/256802)Attach a screenshot of Hardware CF configuration.

comments: author: Jessie Chia
body: ![Screenshot 2024-07-19 at 10.02.27?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/336551iB590771500F6E69A/image-size/large?v=v2&px=999 "Screenshot 2024-07-19 at 10.02.27?AM.png")


author: Adolfo Casari
body: [@Jessie Chia](/t5/user/viewprofilepage/user-id/256802)

Location=${customfield_10074.label}


author: Jessie Chia
body: Thank you, Adolfo. However, this does not work.

![Screenshot 2024-07-22 at 7.16.44?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/336907i154EC7A340326F44/image-size/large?v=v2&px=999 "Screenshot 2024-07-22 at 7.16.44?AM.png")


author: Adolfo Casari
body: customfield_10074 is your single select customfield, right?

Location, the hardware attribute, is single or multiselect?

if it's multiselect, use IN instead =


author: Jessie Chia
body: Correct.

What you have suggested work in Data Center edition, but does not work on Cloud.


author: Adolfo Casari
body: That's right, I am in DC.

Actually that's a restrictiction in Cloud, but here is a workaround:

<https://jira.atlassian.com/browse/JSDCLOUD-10185>

(i.e. move your Location single select to an Asset object and use this in your request)


Tags: cloud

jira-service-management

jira-service-management-cloud
Automate Weekly Recurring tasks to Last Business Day of Next Week
Asked by Jeremy D:

Certain administrative tasks must be done on a weekly basis. For these tasks I am trying to create a automation that creates a duplicate issue assigned to the same user for the next Friday.

I am Cloning the issue based on the assigned component (Friday Recurring), but I am running into several issues.

1. I can't determine how to set the Cloned issue due date to the next Friday. It needs to be the next Friday (or better, last business day of the next week) no matter what day of the current week it was completed.
2. When this issue is Cloned it adds the word "CLONE" to the beginning of the summary field. Is there a way to eliminate this?
3. Lastly, I can't get the component to clone to the new issue.


Answers:
author: Mark Segall
body: Hi [@Jeremy D](/t5/user/viewprofilepage/user-id/4468674)

Perhaps instead of cloning, you use an automation issue to create the cloned value. Then copy pertinent information from the source to the new issue. Here's how I would tackle your challenges:

1. If I understand correctly, you don't want Friday of current week, but Friday of next week. If so, here's how to get it
   1.

      ```
      {{now.withNextDayOfWeek("FRI").plusDays(7)}}
      ```

2. Removing the CLONE to the beginning of Summary
   1.

      ```
      {{issue.summary.remove("CLONE")}}
      ```

3. Should be able to copy from the source issue in your automation rule.

comments: author: Mark Segall
body: I should add that #2 becomes irrelevant if you use automation to spawn the new issue instead of adjusting it after the fact.


author: Jeremy D
body: This works except if I complete the task on Friday. Could I do the add days first (say 4 days) and then the Friday argument?

{{now.plusDays(4).withNextDayofWeek("FRI")}}


author: Mark Segall
body: Ahh - So if it occurs on Friday, you want it to be next Friday? In that case you'll want something a little more complex. The easiest way would be to add an IF condition to your flow. Here's an example I threw together:

![2022-02-18_10-54-27.png](https://community.atlassian.com/t5/image/serverpage/image-id/184268i918E176020900053/image-size/large?v=v2&px=999 "2022-02-18_10-54-27.png")

For copy/paste purposes, here's what I used for the IF condition:

```
{{now.fullDate.left(3)}}
```


author: Karyna Tyrnavska _SaaSJet
body: Hi, [@Jeremy D](/t5/user/viewprofilepage/user-id/4468674) ! As an alternative, you can use the [Business Process Manager](https://marketplace.atlassian.com/apps/1225573/business-process-manager?hosting=cloud&tab=overview&utm_source=Atlassian_Community&utm_medium=referral&utm_campaign=Comment_Automate-Weekly-Recurring-tasks_20220520) add-on developed by my team.

You can transform your tasks into Templates and set a schedule for each repetitive process. So, administrative tasks will be done on a weekly basis or as you wish.

![99CD160E-AEC5-4AF5-8015-7CCCFA20BFAB.gif](https://community.atlassian.com/t5/image/serverpage/image-id/198343iCC09BB71FB031A94/image-dimensions/231x303?v=v2 "99CD160E-AEC5-4AF5-8015-7CCCFA20BFAB.gif")
Is there an option to create an automation rule triggered by an issue being archived?
Asked by Omer Meshar:

There is an option to trigger a rule when an issue is deleted, but what about archived?


Answers:
author: Pramodh M
body: Hi [@Omer Meshar](/t5/user/viewprofilepage/user-id/3513693)

It's still in feature request

<https://jira.atlassian.com/browse/JIRAAUTOSERVER-307>

You could work with webhooks for this

<https://jira.atlassian.com/browse/JRASERVER-68024>

If we need it from Automation, we need to wait till Atlassian releases this feature

Thanks,

Pramodh

comments: author: Omer Meshar
body: Thanks for the quick response Pramodh!


author: Mykenna Cepek
body: I think that *issue-*level archiving is supported by Jira Data Center and Server only (and in JSM).

I believe *issue* -level archiving is not available for Jira Cloud (in case anyone finding this thread was wondering). Jira *projects* can be archived (View All Project \> 3-dots menu for a specific project \> Archive).


Tags: archive

delete
React app, pipeline deployment on ionos 1&1 server failing.
Asked by Hassan Hassnain:

Hello,

I am new to bitbucket. I am trying to depoy my react app on ionos webspace with following config

<br />

image: node:16

# Workflow Configuration

pipelines:  
default:  
- parallel:  
- step:  
name: Build and Test  
caches:  
- node  
script:  
- npm install  
# CI=true in default variables for Bitbucket Pipelines <https://support.atlassian.com/bitbucket-cloud/docs/variables-in-pipelines/>  
- npm test  
- step:  
name: Lint the node package  
script:  
# Run your linter of choice here  
- npm install eslint  
- npx eslint src  
caches:  
- node  
branches:  
master:  
- parallel:  
- step:  
name: Build and Test  
caches:  
- node  
script:  
- npm install  
# CI=true in default variables for Bitbucket Pipelines <https://support.atlassian.com/bitbucket-cloud/docs/variables-in-pipelines/>  
- npm test  
- npm run build  
artifacts:  
- build/\*\*  
- step:  
name: Security Scan  
script:  
# Run a security scan for sensitive data.  
# See more security tools at [https://bitbucket.org/product/features/pipelines/integrations?\&category=security](https://bitbucket.org/product/features/pipelines/integrations?&category=security)  
- pipe: atlassian/git-secrets-scan:0.5.1  
- step:  
name: Deploy to Production  
deployment: Production  
# trigger: manual  
clone:  
enabled: false  
script:  
# sync files to IONOS WebSpace  
- pipe: atlassian/ftp-deploy:0.3.7  
variables:  
USER: $USER  
PASSWORD: $PASSWORD  
SERVER: $SERVER  
REMOTE_PATH: '/v3'  
LOCAL_PATH: 'build'  
getting error  
Deploy to Production  

```
Status: Downloaded newer image for bitbucketpipelines/ftp-deploy:0.3.7[36mINFO: Starting FTP deployment to access858581656.webspace-data.io:/v3...[0mmirror: Login failed: 530 Login incorrect.[32m? Deployment finished.[0m
```


Answers:
author: Nic Brough -Adaptavist-
body: I think the error message is pretty clear with the 530 error.


Tags: bitbucket-pipelines

deployment
How to automate the services of Property Management Company?
Asked by Mohammad Moslem Uddin Sikder:

I am the General Manager responsible for the total management of of a project called "Sheikh Hasina Software Technology Park". This is the first hi-tech Park of Bangladesh located in Jashore.   
We have a team of service provision to the users who has invested in ICT sector of the country to develop ICT Industry. Major area of my responsibility of my company Techcity Bangladesh Limited is to provide Operation and Maintenance(OM), Safety and Security, Cleaning, Gardening etc.

I would like to create an automated environment to manage all necessary events for the provision of good service.


Answers:
author: Nic Brough -Adaptavist-
body: It sounds like <https://www.atlassian.com/software/jira/service-management> would be a place to start with Atlassian.

comments: author: Charlie Gavey
body: And here's some examples of how you can use Automation to streamline business processes in Jira Service Management:  

<https://www.atlassian.com/software/jira/automation-template-library/jira-service-management>

<https://www.atlassian.com/software/jira/automation-template-library/business-teams>  


Tags: cloud
Automation rule - link to a particular epic depending on the changed value of a field
Asked by Sachin Manjaiah:

Hello,

I'm looking to build a global automation rule that needs to work something like this.

When a field, let's say 'Client' (which is a drop down field and not free-text) on the issueType 'Candidate', is updated to a particular value, say Client-1, we need the automation rule to update the Epic link on that candidate issue to a particular epic that we can define, say Epic-5. We don't need any further action.

Tried finding a trigger condition to put this in place but couldn't quite match the conditions as 'issue updated' condition only checks if a given field was updated but doesn't let me check if the said field was updated to a particular value.

Any help is much appreciated!


Answers:
author: Bill Sheboy
body: Hi [@Sachin Manjaiah](/t5/user/viewprofilepage/user-id/4655217)

Would you please post images of your rule and the audit log details? That may provide context for what is happening. Thanks!

Until then, I suspect that the condition in your rule is testing against the field alone...which would return the ID for the selected value. But the dropdown field's value has both an ID and a value component. Perhaps try comparing to this, changing to your field's name:

```
{{issue.myCustomFieldName.value}}
```

Kind regards,  
Bill

comments: author: Sachin Manjaiah
body: Thank you Bill. You're amazing. I tried it out and was able to get to the bottom of it. Your help is much appreciated!


author: Stefan Salzl
body: Hi [@Sachin Manjaiah](/t5/user/viewprofilepage/user-id/4655217) ,  
could you show a screenshot of your issue? Are those fields 'custom fields' ?

I created a rule to kinda reproduce your requirement with the priority field:

given: issue value changes in field 'priority'  
when: new value is 'highest'  
then: edit issue --\> set Epic Link to \<anyEpic\> (eg. JT-58 in my case)

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


author: Sachin Manjaiah
body: Just to provide more details and context, I have tried something like so:

<br />

When: Value changes for: field

New Condition: Field equals 'selected value from dropdown list'

New Action: Then : Edit Issue Fields: Epic Link.

This doesn't seem to work
How can I escape special characters when sending issues comment through a webhook?
Asked by Pablo Serra:

Hi There,

I have a rule that comments issues on a cloud instance with the last comment body of the issues of another cloud instance, by sending {{issue.comments.last.body}} through a webhook:

![Comment Body 1.png](/t5/image/serverpage/image-id/182989i112A70FAC4DD1735/image-size/large?v=v2&px=999 "Comment Body 1.png")

I'm having some issues with special characters, e.g.:  

![Comment Body 2.png](/t5/image/serverpage/image-id/182990i08993FDB24AAC6F8/image-size/large?v=v2&px=999 "Comment Body 2.png")

![Comment Body 3.png](/t5/image/serverpage/image-id/182993i1079F36485928D33/image-size/large?v=v2&px=999 "Comment Body 3.png")

On the receiving instance I'm getting the following:

![Comment Body 4.png](/t5/image/serverpage/image-id/182995i22EDD0EF265902F7/image-size/large?v=v2&px=999 "Comment Body 4.png")

Any suggestion on how to handle this kind of comments?

Thanks in advance!


Answers:
author: Bill Sheboy
body: Hi [@Pablo Serra](/t5/user/viewprofilepage/user-id/904478)

Have you tried any of the smart value encoding functions provided by automation before sending the message: <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#Encoding>

Kind regards,  
Bill

comments: author: Pablo Serra
body: Hi Bill, thanks for your reply.

I've contacted support and after a little back and forth, they provided me the following function that did the trick: asJsonString()  

In my post:  

```
{"commentAuthor": "{{ issue.comments.last.author.displayName }}","commentBody": {{ issue.comments.last.body.asJsonString() }},"keyBancar":"{{ issue.key }}","summary":"{{ issue.fields.summary }}","keyIssues":"{{ issue.fields.customfield_10716 }}"}
```

<br />

Please note that it must be sent without the quotation marks around the curly brackets.  

More info about this function:  
<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/>


author: Laura Bachiller
body: Hi.

You can also use the json encode function:

<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#Json-encoding>

{{issue.summary.jsonEncode}}


author: Graeme Baker
body: This is really old, but I've been trying to do the same thing lately and came across this article.

All I want to do is comment on an issue in 1 instance, and have that fire off a message to a webhook in Jira automation, and it add that comment to a linked ticket (via custom field).

From above there was a missing colon, and comma:

```
{
  "comment": {
    "id" : "{{comment.id}}",
    "body" : {{comment.body.asJsonString()}},
    "author" : {
      "accountId" : "{{comment.author}}",
      "displayName": "{{comment.author.displayName}}"
    }

  }

}
```

How do I use an incoming webhook to update a specific issue with this comment from the payload using these smart values?

```
{{webhookData.comment.body}}
{{webhookData.comment.author.displayName}}
```


author: Pablo Serra
body: Apparently the problem are the line breaks. Only comments with line breaks failed to impact on the receiving instance.


Tags: cloud

jira-cloud
How can I receive the data from a Jira webhook?
Asked by Camilla Pinto Lisboa:

I have this application in Django rest framework and need to receive an event from Jira there. Every time the issue status change, this event is created and I need to receive the data so I can update my application with the changes. Anyone knows how can I do that? I would appreciate it!


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

If your application has a REST API method which can be called, consider using an Automation for Jira rule, triggered on the status transition, to call the method. Please look here for more information:

* <https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Send-web-request>
* <https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828>

Kind regards,  
Bill


author: Maksim Marholin
body: Hi [@Camilla Pinto Lisboa](/t5/user/viewprofilepage/user-id/4751063)

thanks for your question.

I'd suggest raising this with <https://getsupport.atlassian.com/>.

Cheers, Maksim


Tags: cloud

webhook
Copy fixVersion to a text field
Asked by Nofar Ben Kereth:

I'm trying to copy the fixVersionto a text field (for an integration that doesn't work with fixVersion field).

I configured a pretty simple rule that indicate "success" when I run it but the text custom field isn't changing.

![Screen Shot 2022-02-09 at 17.36.33.png](https://community.atlassian.com/t5/image/serverpage/image-id/182572i57BE21355849D282/image-size/large?v=v2&px=999 "Screen Shot 2022-02-09 at 17.36.33.png")![Screen Shot 2022-02-09 at 17.36.38.png](https://community.atlassian.com/t5/image/serverpage/image-id/182571i333C4460678301D7/image-size/large?v=v2&px=999 "Screen Shot 2022-02-09 at 17.36.38.png")


Answers:
author: Alexis Robert
body: Hi [@Nofar Ben Kereth](/t5/user/viewprofilepage/user-id/3709861) ,

this is because the smart value for fixVersion is a list, so you can't juste use it like that.

If you want the versions name, you should use this :

```
{{issue.fixVersions.name}}
```

Let me know if this helps,

--Alexis

comments: author: Nofar Ben Kereth
body: That worked thanks!!
How to define action for empty smart value?
Asked by Jenni:

Hello,  

I have a following script that lists issues in Slack message depending on issue priority:  

```
*{{issue.summary}}* has been completed *({{Perforce Branch.value}} {{Platform Options.value}} {{Build exe.value}}*).
*CL:* {{Revision}}
*Link:* <{{issue.url}}|{{issue.key}}>
*Tester:* {{initiator.displayName}}

*Results:*

:blocker: *Blocker*
{{#issue.issuelinks.outwardIssue}}
{{#if(equals(priority.name, "Blocker"))}}
* <{{url}}|{{key}}> - {{summary}}
{{/}}{{/}}

:bangbang: *Critical*
{{#issue.issuelinks.outwardIssue}}
{{#if(equals(priority.name, "Critical"))}}
* <{{url}}|{{key}}> - {{summary}}
{{/}}{{/}}

:large_red_square: *Major*
{{#issue.issuelinks.outwardIssue}}
{{#if(equals(priority.name, "Major"))}}
* <{{url}}|{{key}}> - {{summary}}
{{/}}{{/}}

:large_green_circle: *Normal*
{{#issue.issuelinks.outwardIssue}}
{{#if(equals(priority.name, "Normal"))}}
* <{{url}}|{{key}}> - {{summary}}
{{/}}{{/}}

:large_blue_circle: *Minor*
{{#issue.issuelinks.outwardIssue}}
{{#if(equals(priority.name, "Minor"))}}
* <{{url}}|{{key}}> - {{summary}}
{{/}}{{/}}
```

However, I'm not sure how to add to the script when there is, say, no Minor issues? If there is nothing to print, currently there's just empty space after the heading - but I'd like it to say something like ":tada: No new Minor issues found!" Not just sure what IF or NOT condition I should be referring to?  

Pinging [@Mykenna Cepek](/t5/user/viewprofilepage/user-id/3527113) as you've provided great answers before! :)


Answers:
author: Mykenna Cepek
body: Wow, my first shout-out right in the OP. I'm humbled, [@Jenni](/t5/user/viewprofilepage/user-id/4739323) !

So, one option is to use nested #if statements to suppress an entire section:

```
{{#if(equals(0,0))}} {{#if(equals(1,1))}} hello {{/}} {{/}}
```

But that's starting to get excessive and hard to read.

Something else to consider would be to pull out most of the #if logic into conditionals in the rule before the Slack action, and build variables for the output. Then when creating the slack message:

```
{{#if(not(myvar1.equals("x")))}}
{{myvar1}}
{{myvar2}}
{{/}}
```

or whatever.

Note that I've not had good success with defining blank variables in automation. That's why my example above checks against "x". There may also be issues with newline in variables.  

So the pseudocode for one section might be like:

* action: set variable(s) to "x"
* conditional: if priority.name = "Major" then set variable(s) to real values

I hope that makes sense.
Change the value only for a certain type of subtask
Asked by Evgeniy S_:

Dear community, sorry for my english.

We use two types of subtasks:

- Sub task

- Sub Bug.

I have a rule that should work like this: - When the task status changes - Only sub-task should also change status But sub-bug status should not change.

I set it up like this, it works, but it is not very optimized and spends a lot of resources, as it goes through all the sub-tasks of the project.

Tell me, please, how can I optimize it so that the rule only works for sub-task, and does not work for sub-bug?

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/182460i565C4D9B57BB3A65/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/182461i6EB365DA1096C24B/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/182462i4F518ECB594167FF/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/182463i1EA51A94D40AC124/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Curt Holley
body: Hi [@Evgeniy S_](/t5/user/viewprofilepage/user-id/4640938)

I think [@Pramodh M](/t5/user/viewprofilepage/user-id/3691224) means to do it like this (and just select Sub-task as highlighted below)

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

comments: author: Pramodh M
body: Yes Correct [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535)

[@Evgeniy S_](/t5/user/viewprofilepage/user-id/4640938) Please check with the above and let us know if it works


author: Evgeniy S_
body: Super. It works, and it works much better than my version. Thank you! ?


author: Pramodh M
body: Hi [@Evgeniy S_](/t5/user/viewprofilepage/user-id/4640938)

Welcome to the Community!!

Inset the Field value condition as Issue type = Sub-task, which should come out of Automation if it is not the Sub task

Let me know if this works

Thanks,  
Pramodh

comments: author: Evgeniy S_
body: Thanks for the answer.

Do you mean specify Sub-tasks in the assignment, and not JQL, as in the screenshot?

In this case, the status changes for all subtasks, both for sub-task and sub-bug.

And you need something that would change only for subtasks with the "sub-task" type :(

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