Comments
-
I haven't done much with Automation. So I'm not sure if each actions are expected to be independent, of if they are typically cummulative against an ephemeral issue object in memory and only persisted at the end of the automation rule execution (once all actions have been gathered). But assuming you want the action to be…
-
Pehaps start with: issueLinkManager.getLinkCollection(issue, currentUser1).getInwardIssues('Booking Child').collect{it.key} This should get you your list of issues. If you don't get any issues, try to play with different variations of inwardIssues or outwardIssues and different issue type description. Then, the next step…
-
In groovy, when you enter a "closure", a variable called "it" is automatically assigned to the object that the closure is acting on. In this case, the closure is one provided by groovy collection which includes generating a sum Basically, with a list/collection, some of the most frequently used methods are going to be…
-
The only way I know is to use a groovy script: import com.atlassian.jira.component.ComponentAccessor import com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade IQLFacade iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(IQLFacade) def iql = 'object having inR(objectType="Object A1") OR…
-
Hi @Jamie Echlin _ScriptRunner - The Adaptavist Group_ A suggestion for the script registry... Provide an option (before running the script) to only include in-line scripts. Most people that have scripts stored in files will be able to easily search either with their IDE or the OS filesystem to find specific strings. The…
-
You can use the IssueLinkManager to get all the issues from a specific issue link type import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue def currentUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser def issueLinkManager = ComponentAccessor.issueLinkManager def…
-
Yes, behaviors work pretty much just the same in jira as in service desk portal. I have found some slight differences when dealing with getting values from Insight custom fields. There are some inconsistencies as to whether you get a string or a size-1 array when a single value is selected. One is a string, the other is an…
-
Have you tried the script registry? https://docs.adaptavist.com/sr4js/6.54.0/features/built-in-scripts/script-registry?utm_source=product-help This will expose all your scripts, inline as well as script files. If you have a lot, the UI can be a little slow. But I use it all the time just for that purpose. I just use the…
-
Like I said. I had never used groovy from the command line. That was just the first result I found when I searched for how to install groovy on RHEL. https://snapcraft.io/install/groovy/rhel
-
Groovy in jira/scriptrunner is embedded into the scriptrunner plugin via the inclusions of libraries. There are no executable that you can reach via the command line. Once you start execution of a python script in a shell, you can't access the JVM components anymove other than through an externalized endpoint. And the only…
-
sure... that's quite simple: import com.atlassian.jira.component.ComponentAccessor def restrictedIssueTypes = ['Bug', 'Defect'] if(!restrictedIssueTypes.contains(issue.issueType.name)){ return true } ComponentAccessor.groupManager.isUserInGroup(currentUser, 'Security')
-
I'm not sure this is the best forum for your question. But it got me curious even though I'm not much of a python guy and I had never used groovy command line. I installed groovy and used the same subprocess.Popen to start a simple script. While documentation says it should be possible for a groovy script executed with the…
-
A "simple scripted validator" on your create transition can accomplish that. import com.atlassian.jira.component.ComponentAccessor ComponentAccessor.groupManager.isUserInGroup(currentUser, 'Security') Note: currentUser is already defined in a simple scripted validator. And the last line will return true/false. If it…
-
Whatever text you want to add with appropriate wiki style formatting will appear in the description. Manually start an issue creation... type in your description as you want with all the format you want. Change your description editor to from "Visual" style to "Text" style and copy all the text from the box for input in…
-
The issue picker respects the security and will only show the issues that the user has access to. I would not recommend granting additional permission to customer users. One alternative I can perhaps suggest is to use a test field and ask the customer to just type the key. Then, using behaviour serverside script, you can…
-
I'm not sure how you were ever able to access it directly. Normally, in scriptrunner, you need to have the following in your script to allow imports from other plugins: import com.onresolve.scriptrunner.runner.customisers.WithPlugin @WithPlugin('com.riadalabs.jira.plugins.insight') insightPlugin But I'm on Jira 8.13.x and…
-
Like my earlier response, you can only do that with behaviour. Behavior setHelpText and setDescription support full html, so you can post a link.
-
Have a look at the following. I added some comments. Commented out some sections. /** * Used my IDE "optimize" imports which removes unused or unnecessary import */ import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue import…
-
When exploring something like this, I helps to examine the results with a bit more details. Instead of log.warn("businessCat Field: " + businessCat) You can do log.warn "Field Value: $businessCatValue ($businessCatValue.getClass()}" It should print something like this in the log Field Value: [Environmental Services]…
-
I've been meaning to reach out to Refined about the availability of the dialog2 (and many other AUI components) in their javascript layer to be able to implement custom dialog etc. Yes, the availability of jiraHelper in the portal is probably a question for adaptavist. But I'm not sure that would help you. I don't think…
-
I can't imagine a difference that drastic between 8.13 and 8.15 Here is an example that worked for me in powershell:
-
Shre your create sub-task script, I'll help you get the customfield populated there. It's better than doing it in the next workflow.
-
How are you creating your subtasks? Why not populate the data source with the object at that time? Your existing should work mostly as is... here is a simplified version. I'd recommend including the object type in the IQL to make sure you don't get a false match import com.atlassian.jira.component.ComponentAccessor import…
-
This page should help you do that: https://docs.adaptavist.com/sr4js/latest/features/behaviours/behaviours-examples/setting-a-default-description
-
That's definitely the required format (at least with my version.... 8.10.1). I was able to do some test updates from Postman. I don't have much experience with powershell, so I can't help debug that part. But come to think, before I got the correct format, I never received a 415 (which normally stands for "unsupported…
-
The question is basic... but not the solution. I'm not aware of any built-in way to prompt customers for additional information on a request. There might be add-ons that offer some forms, but the only built-in form is the new request form. From scriptrunner standpoint, you might be able use the Web Item with "run code and…
-
I looked up the documentation (same one you posted) and figured out the correct format. Try this: $body = "{ "objectId": 21408, "objectTypeAttributeId": 2814, "objectAttributeValues": [ {"value":"JIRAUSER10116"} ] }"
-
I don't have experience with this. But I found this https://stackoverflow.com/questions/1161147/how-do-i-get-groovy-and-jaxb-to-play-nice-together I tried some sample code and couldn't get it to work either. Could be the way groovy is implemented in scriptrunner doesn't quite allow using JAXB
-
In the workflow definition for the Transition (arrow) that goes from "approved and open" to "reserved", go to the Post Function tab. There, click Add post function. In the list, find "Insight Post-Functions" In the list of insight post functions select "Se the value of an object attribute with a predefined value" Select…
-
I would recommend you raise a support request for this. Seems like some core product changes are reqiured to either 1) expose those icons publicly or 2) adjust the email template to either exclude the icon or include the icon image in the email body (not as a url) The only option possibly available to you right now would…