youngmon/atlassian-qna huggingface dataset:
Is Jira Service Management a good solution for a B2C product user support portal?
Asked by Ekaterina Konovalova:

I am researching a solution for my B2C platform to collect bug reports and feature requests. All the tutorials mostly focus on business customers, so I wonder if it's a good idea to use JSM for B2C. And I still don't get it if reporters need to login to submit, for example, a bug report through external facing JSM?


Answers:
author: John Funk
body: Hi Ekaterina - Welcome to the Atlassian Community!

Yes, Jira Service Management would be great for that. You can have anonymous ticket creation, but they won't be able to follow the resolution of the bug or communicate about it if they do not create a login. But you can have free access using the Customer user type.


Tags: cloud

jira-service-management

jira-service-management-cloud
Automation - check attachment filesize
Asked by Cedric Tornow:

Hi Folks,

I'm trying to check the size of an Attachment with the following smart value: {{attachment.size}}

![size2.jpg](/t5/image/serverpage/image-id/334900iAF687877FCF02A51/image-dimensions/300x212?v=v2 "size2.jpg")

Looking to the smart values doc, the size is expressed in Bytes.

![size.png](/t5/image/serverpage/image-id/334901i6B44F4FA8FF8168E/image-dimensions/347x40?v=v2 "size.png")

By testing the automation, I can see the condition does not match even if I set it to a very low value. I tried also to put "1Kb", that doesn't work either.

Any advice ?

Thks in advance for your support !


Answers:
author: Duc Thang TRAN
body: Hello [@Cedric Tornow](/t5/user/viewprofilepage/user-id/5540741)

The smart value {{attachment.size}} will provide you the number attachement in your issue

If you looking for a size of a attachement you can use this smart value

{{attachment.\[xxx\].size}} with \[xxx\] is the name of your attachement

orthewise you can using {{attachment.last.size}} or {{attachment.first.size}} for the last or first attachement

Hope this can help :)

comments: author: Cedric Tornow
body: [@Duc Thang TRAN](/t5/user/viewprofilepage/user-id/5371199) it works like a charm, thanks !


Tags: cloud

jira-service-management

jira-service-management-cloud
custom field value + summary
Asked by Edvinas Puslys:

When using automation I set it to work when the custom field is changed. Once it is changed the value gets added to the summary as so: {{issue.custom field name}}{{triggerissue.summary}}. Every time I change the value it gets added in front of the summary (custom field value + custom field value + summary), instead of only changing the value of the custom field in the summary.


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

For automation questions like this, please consider posting an image of your rule and the audit log. That will provide context for the community to offer ideas. Thanks!

For what you are noting, you can solve this if you add some type of separator/delimiter between your field and the original summary. For example a semicolon. Then you can use a function like [substringAfter()](https://support.atlassian.com/jira-software-cloud/docs/smart-values-text-fields/#Smartvaluestextfields-substringAfter-Stringseparator-) to help.

* trigger: custom field changes
* action: edit summary to add the new custom field value

```
{{issue.custom field name}}{{issue.summary.substringAfter(";")}}
```

You may need to adjust this to handle the special case when there is not semicolon, or always add one to start.

Best regards,  
Bill
Roll up story points to epic failing on JQL clause
Asked by Neil Wills:

The Lookup clause below is causing an error when the Epic titles contains spaces:

issuetype in (Story) and "Epic Link" = {{issue.epic name}}

##### [Lookup issues](https://globysinc.atlassian.net/plugins/servlet/ac/com.codebarrel.addons.automation/cb-automation-project-config?project.key=MNG&project.id=10013#!/rule/2023595/57079930) {#toc-hId-1962732472}

There was an error executing a search during custom value definition: .  
Custom Smart Value JQL Search: "issuetype in (Story) and "Epic Link" = Testing Framework" - Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'Testing'. (line 1, character 49)  
The above error does not occur when the Epic Link and Name do not contain spaces:  
Epic Name: Test Framework \[Creates error\]  
Epic Name: TestFramework \[When the epic name does not contain spaces this clause works, which naturally does not work as epic names will have spaces.\] I determined this by removing the spaces 'TestFramework' and the OR or AND error above goes away.

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


Answers:
author: Gareth Cantrell
body: Hi [@Neil Wills](/t5/user/viewprofilepage/user-id/4327689)

You can wrap the smart value in quotes to cater for multi-word strings: "Epic Link" = "{{issue.epic name}}"

comments: author: Neil Wills
body: by adding quotes to "{{issue.epic name}}" does this cast the expression to a string?


author: Gareth Cantrell
body: There is no casting involved. You are simply wrapping the output of the smart value in quotes so that the JQL is valid in the same way that a manual JQL query needs to have values with spaces quoted.


author: Bill Sheboy
body: Hi [@Neil Wills](/t5/user/viewprofilepage/user-id/4327689)

I believe that epic link is actually a key value, and just renders as the epic name in the user experience views. Please try this instead for your JQL in the lookup issues action:

issueType IN (Story) AND "Epic Link" = {{issue.key}}

Best regards,  
Bill

comments: author: Neil Wills
body: I'll experiment, I suspect the issue.key might not match "Epic Link" depending what the value of issue.key is. I used the above solution also.


author: Bill Sheboy
body: Gotcha, and...

* **Inside of the branch** you showed, the {{issue}} will always be the epic, as that is the current context/scope
* If also inside the branch, you wanted to access the story which fired the rule you would use {{triggerIssue}}
* Once back outside the branch, {{issue}} would once again refer to the trigger issue (the story)
How to send webhook message with each work logger's total time spent in the current day
Asked by YY Brother:

Hello,

I have an scenario as follows:

I need to check whether any guy doesn't log the expected total 8 hours today (e.g.g Jack should log 8 hours today, but actually his total work hours logged in Jira is just 4 hours today). Then I need to get all the guys whose total work hours less than 8 hours and more than 14 hours today, and send the guy's name, today's total logged hours through webhook to Slack.

Is it possible to implement it using Jira automation? I guess it needs to group today's worklogs by the work logger and sum the total time spent by each guy.

PS: I use**Jira Server**.

Thanks,

Craig


Answers:
author: Darryl Lee
body: I just want to say - I'd kind of hate to be Jack, getting nagged when I don't exactly hit my target hours.

comments: author: Curt Holley
body: Exactly [@Darryl Lee](/t5/user/viewprofilepage/user-id/1365322)

This is great example of measuring the wrong thing.

If i were Jack, I'd either

* leave
* automate the population of 8 hours a day


Tags: jira-server
Insight Cloud Automation - Monitor Object's Attribute changes
Asked by Horacio Escalada:

I would like to send a notification when an Attribute change value.  

What I have done is When and Object is updated, using Lookup Objects action to filter recently updated objects and then looping through the results create the notification listing Name and Status attributes

I don't know how to identify what attribute was changed.  

The ideal situation will be to get access to the object change log and compare OLD VALUE with NEW VALUE   

<br />

<br />


Answers:
author: Hakan Bahadir
body: Hello,

The Object Trigger has the value of the Object key when the rule is executed.

For example the smart value:

    {{object}}

will give you the Object Key value. Which means, instead of the LookupObjects action you could use a "Send web request" for calling the Insight Rest API and get the history of the Object then compare the attribute's values which you are interested in. You may find the history request details here:

<https://developer.atlassian.com/cloud/insight/rest/api-group-object/#api-object-id-history-get>

I hope this helps.

Cheers

Hakan Bahadir


Tags: insight
How can I access BigPicture hierarchy links via PluginAccessor (or other scripting method)?
Asked by JosieWolfe:

I am trying to use ScriptRunner to access BigPicture hierarchy links. They are not stored as regular Jira Links, so I'm assuming I need to use a function of PluginAccessor, but my best guesses have not been successful.

I've tried pluginAccessor.getEnabledPlugins() which doesn't give me an error, but then I can't seem to figure out the functions to actually access BigPicture information.

I've tried getBox(), getallBoxDescendantTasks(), etc., based on similar commands for the JQL filters, but get errors for all.

I've searched for information online, but I'm not finding anything. If anyone could point me in the right direction, it would be greatly appreciated.


Answers:
author: Anna-BigPicture
body: Hi [@JosieWolfe](/t5/user/viewprofilepage/user-id/4532282)

I've noticed that you have raised a support ticket via our Service Desk.

Currently, our agents are intensively working on providing you with a solution. Once your case is resolved, you can share the outcome with the Community.

comments: author: JosieWolfe
body: The result of my support ticket was that BigPicture does not support any API access via ScriptRunner or other scripting tool. They said that they are planning, in a future release, to add functionality to be able to automatically duplicate the BigPicture hierarchy links with Jira links. This would enable a workaround for many scripting needs because we could then script to look for the Jira links instead of BigPicture links, however, I would strongly recommend that BigPicture consider adding API access. This type of flexibility is one of the primary selling points of the Jira product as a whole, and for this tool to completely block that flexibility is a significant drawback of your tool in my opinion.


author: Daniel Turczanski - __JQL Search Extensions
body: Hi [@JosieWolfe](/t5/user/viewprofilepage/user-id/4532282)

Why not use a JQL filter as a source of issues in the box? This way you should be able to get a list of issues by executing the filter.


author: Adam _SoftwarePlant_
body: Hi [@JosieWolfe](/t5/user/viewprofilepage/user-id/4532282)

Thank you very much for your valuable feedback. It is true that when it comes to API matters in BigPicture, we do not have any public API so that our customers can use since it changes from release to release, however, we are working really hard to make it happen, and I hope that we will be able to share the good news about this soon. I will also pass your feedback to our Product Management so that they are aware of this.

I hope this helps Josie!

Have a good one and best regards,

Adam


author: JosieWolfe
body: [@Daniel Turczanski - __JQL Search Extensions](/t5/user/viewprofilepage/user-id/1160099) I am trying to do scripted automation, not just generate a list of issues.


Tags: cloud
Create a validator script in Jira Cloud
Asked by Damla Naz Yilmaz:

If the user is already set as assignee somewhere in the project, he should not be able to transition another issue. therefore Iwould like to write a script validator.   
I already tried something like  
issue.assignee.includes(user.accountId).  
But I was not succesfull.Does one of you have an idea and can help me


Answers:
author: Nic Brough -Adaptavist-
body: I am not sure I understand what you are trying to do here. The way I read it is:

If a user is assigned issue X then they are not allowed to do a transition on issue Y.

Is that right?

It's quite an unusual requirement, I would expect something more like "only the assignee of Y can transition Y"

I can't tell why your code doesn't work without being clear on what it is trying to achieve.


Tags: cloud

jira

script
How to display the test results on jira, through the automated test results triggered by testflo?
Asked by william_chiu ???:

Hi \~

This problem has bothered me for days.

How to display the test results on jira, through the automated test results triggered by testflo?

I can auto test triggered by TestFLO, but test results cannot display on jira?

**"TP Progress"**always does not change to "PASS" or "FAIL", so have some question?

1. What format about test result file? .XML?

2. What is needed for File content? If the file format is .XML.

Thank you so much\~

William


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

Your post seems to indicate you are using Jira Cloud, and yet the tool you note is only for Data Center: TestFlo

Please consider contacting the vendor or checking their documentation to see if what you ask is possible: [https://marketplace.atlassian.com/apps/1211393/testflo-test-management-for-jira?tab=support\&hosting=datacenter](https://marketplace.atlassian.com/apps/1211393/testflo-test-management-for-jira?tab=support&hosting=datacenter)

Best regards,  
Bill


Tags: cloud
How to send last comment with the Automate and lookup issues?
Asked by Mikhail Singaevsky:

Hello all!

I'm writing report using Automate and lookup Issues. And I need to send the **last comment** .  
If I use any smart values with comment, I don't get comments in the email.  

Please, help me, how can I send last comments for lookup issues in one email?  
Maybe there is another way to configure Automate for this or another request?

```
{{#lookupIssues}}

<a href="{{url}}">{{key}}</a> {{now.mediumDateTime}}
{{summary}}

<b>Description:</b>
{{description}}

<b>last Comment:</b>
{{lastComment}}, {{Comment}}, {{comment.body}}, {{issue.lastComment}}, 
{{issue.fields.lastComment}} -- any smart values with comment that I used don't work

{{/}}
```

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


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

For Jira Cloud automation, [lookup issues only supports a limited number of fields](https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/#Smartvaluesgeneral---lookupIssues--), and comments are not included. There is a suggestion to add more fields, and it is in the "future consideration" status: [JRACLOUD-75018](https://jira.atlassian.com/browse/JRACLOUD-75018)

One complicated work-around for this would be to use a [web request action to call the REST API](https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828) with a [JQL search](https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/search-search), and then parse the response with [text](https://support.atlassian.com/jira-software-cloud/docs/smart-values-text-fields/) and [list](https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/) functions to build your email.

Best regards,  
Bill

comments: author: Mikhail Singaevsky
body: Hello and thank you!


author: ?????? ???????????
body: Please tell me how to continue using Automate tools to work with the received JSON?

Please show me an example?![2021-08-26_17-13-50.png](https://community.atlassian.com/t5/image/serverpage/image-id/157675iFC446CC24134A889/image-size/large?v=v2&px=999 "2021-08-26_17-13-50.png")


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

You may access the response using the smart value:  
<https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/#Smartvaluesgeneral---webhookResponse-->

You will need to understand the structure of your specific request/response in order to parse it.

To parse it, you may dereference the fields with dot-notation and/or extract pieces using:

* text functions <https://support.atlassian.com/jira-software-cloud/docs/smart-values-text-fields/>
* list functions <https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/>

Best regards,  
Bill


Tags: last-comment

search
The issues belong to one version should all get linked to an epic with the same version
Asked by Janaki.R:

Hi,

We had a requirement that the issues like story, bug which have same version should get linked to the epic automatically where the epic will also have same version as stories, bugs.

We are using Jira cloud and there are no addons, can we achieve this using automations.

Thanks in advance!


Answers:
author: DPKJ
body: I don't think automation can help here, but you can surely use ScriptRunner and create a post function script to achieve this.

comments: author: Janaki.R
body: Hi [@DPKJ](/t5/user/viewprofilepage/user-id/690016)

Ok, Thanks for the response.

Can we add newly created version to an issue automatically when new epic gets created with automation


author: DPKJ
body: Take a look at this - <https://community.atlassian.com/t5/Jira-Software-questions/Using-Jira-automation-how-do-I-copy-the-fix-version-from-the/qaq-p/1348377>


author: Simmo
body: Hi [@Janaki.R](/t5/user/viewprofilepage/user-id/3740636)

You can achieve this with Automation easily. I've just put together an example of this for you:

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

This is assuming you're using Fix Version but you can do it with any field.

Cheers,

Simeon.

comments: author: Janaki.R
body: Hi [@Simmo](/t5/user/viewprofilepage/user-id/3608665) ,

Awesome!! Thank you so much.

I have achieved my requirement.


author: Janaki.R
body: Hi [@Simmo](/t5/user/viewprofilepage/user-id/3608665)

Had another question regarding this when the fix version is changed later in the issue the epic link that we linked before should get cleared and link to the new version epic. I have tried the automation it is getting linked to new epic but older epic link is not getting cleared. could you please suggest here.

Thanks,

R.Janaki


author: Simmo
body: Hi [@Janaki.R](/t5/user/viewprofilepage/user-id/3740636)

Sorry about the delay. I've had a few big days of dealing with support escalations and I'm just catching up on things now.

I think the best cause in your new rule would be to use the Delete Issue links action to delete your existing link, then do the linking to the new issue.

Would this work? You can delete all links by the link type.


author: Janaki.R
body: [@Simmo](/t5/user/viewprofilepage/user-id/3608665) ,

Thanks for the response, I have written the automation for deleting the link earlier for field value changed trigger and it is working as expected.

Thanks,

R.Janaki


author: Simmo
body: No worries, glad it was so easy! :D
Epic relationship displays
Asked by Dave W:

When will or how can you get Jira's Task relationships show correctly where you can collapse a Epic like you can now do for Tasks/Sub-Tasks where you can collapse the view of sub-tasks so that you can roll everything up under the Epic?


Answers:
author: Darryl Lee
body: Hi, similar to your [other question](https://community.atlassian.com/t5/Automation-questions/How-to-sum-Task-and-Sub-task-Time-Tracking-under-the-Epic/qaq-p/1783949?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_question&utm_content=topic) that [@Kevin Johnson](/t5/user/viewprofilepage/user-id/3412827) already answered, you'll probably need to look at add-ons for this:

* [Agile Docs](https://marketplace.atlassian.com/apps/1220574/agile-docs-powerful-tree-view-for-jira?hosting=cloud&tab=overview&_ga=2.88998040.2080243483.1570577337-701141406.1570577337)
* [Epic Sum Up](https://marketplace.atlassian.com/apps/1213091/epic-sum-up-simple-project-management?tab=overview&hosting=cloud)


author: Rhys Diab _Agile Docs_
body: Hi [@Dave W](/t5/user/viewprofilepage/user-id/4117138)

As mentioned above you can do this with [Agile Docs](https://marketplace.atlassian.com/apps/1220574/agile-docs-estimate-tree-for-jira?tab=overview&hosting=cloud) (I'm the developer behind it).

You can use it to expand and collapse Epics, Tasks and Sub-Tasks on the one page.

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

Let me know if this is what you're looking for.

Best Regards,

Rhys


author: Rahul_RVS_Support
body: Hi [@Dave W](/t5/user/viewprofilepage/user-id/4117138)

As an alternative, you can also try out our app

[Agile Tools : Epic Tree \& Time in Status](https://marketplace.atlassian.com/apps/1223200/agile-tools-epic-tree-time-in-status?hosting=cloud&tab=overview)

The app provides you complete Epic Hierarchy for a project with progress at each level. You can view/manage roll up for standard Jira hierarchy. Epic -\> User Story -\> Subtask

The app also provides Dashboard gadgets for this data.

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


author: Kevin Johnson
body: Hi [@Dave W](/t5/user/viewprofilepage/user-id/4117138) ,

As I have already mentioned this feature is not there by default, I'm attaching few reference tickets for this feature.

<https://jira.atlassian.com/browse/JSWCLOUD-17275>

<https://jira.atlassian.com/browse/JSWCLOUD-8726>

Regards,

Kevin


Tags: issue-link

view
Returning values from Scriptrunner to Automation
Asked by Martin Cleaver:

From Jira Automation, we'd like to pass values back from calling Scriptrunner. (I have various scenarios where I want to do this, the most common of which is to call an external REST API and deal properly with error codes. A4J aborts any automation on receiving a 404.)

Ideally return values established in Scriptrunner are made available to Automation. I want to keep it as Automation's job to edit the issue so it's clear to the casual nocoder what is going on.

Is this possible? I'm on DC.

Thanks,

Martin


Answers:
author: Martin Cleaver
body: So it looks like the right way to do this is to define a REST endpoint and call that from a waiting WebHook in Jira Automation. (Kudos to [@Tom Hudgins](/t5/user/viewprofilepage/user-id/3814727) on [Need value of automation rule initiator in scriptrunner script](https://community.atlassian.com/t5/Jira-Software-questions/Re-Re-Need-value-of-automation-rule-initiator-in-script/qaq-p/1557830/comment-id/112432#M112432) for his comment about a workaround.)

Even if there is another way, using REST follows the principles of following an existing standard for communicating between different systems, and keeping things as loosely coupled as possible.

The REST API should be set up to guard for permitted APIs. It could be hosted on AWS Lambda/Forge or ScriptRunner or PowerScripts, depending on how future proof the architecture needs to be.

Of course, it would be nice if Scripting solutions for Jira just wrapped the REST call in quasi parameter and return call semantics. i.e. called REST for us and waits for the answer, passing back values via an unpacked webhook response. As it is, you can invoke only with no sense of instructing behaviour or knowing outcome.

comments: author: Gareth Cantrell
body: If you only need to call a REST endpoint to setup a webhookResponses smart value list to use in later scripts, you can do a GET web request to http(s)://your.jira.host/status.

This is a very quick call which requires no authentication and avoids the need to set up a separate REST endpoint in scriptrunner.


author: Martin Cleaver
body: Seems like the values are set by side effect.

So relying on it could break silently down the road.


author: Martin Cleaver
body: That said, I'll play with this - I suspect I passed judgement too quickly.


Tags: cloud

scriptrunner