Comments
-
I have a slightly different approach that I use to make this a bit more accessible for other users in my team. I create a custom rest endpoint in my environment that can extract all the custom fields right on their browser screen for them. import com.atlassian.jira.component.ComponentAccessorimport…
-
The point of the script I wrote was to give you a simple tool to use in the console. This is what it is supposed to look like:
-
There is no native functionality that can do this for you. And scriptrunner can't do that across environments I'm aware of 2 marketplace apps that offer this functionality. * Configuration Manager for Jira (CMJ) (made by Botronsoft) * Project Configurator for Jira (made by Adaptavist - the makers of scriptrunner) Both Apps…
-
Try this in the console: import com.atlassian.jira.component.ComponentAccessor import com.onresolve.scriptrunner.parameters.annotation.ShortTextInput @ShortTextInput(description = "List of project Keys separated by commas", label = "Project Key List") String projectListString @ShortTextInput(description = '', label = "New…
-
I would advise against building your automation strategy using external tools. Calling the REST api can be an option if a lot of your process and data exists in other systems. The REST API framework is really more for building integrations between systems. Generally, Jira automation needs to be triggered by and act on…
-
That is correct.
-
If you have different projects with different security groups, you need to have a way to associate the group with the project. The only other way would be to define the allowed group inside a code block that's controlled by a project key matching. Your code would allow anyone from any of the groups to access the menu item…
-
No see this line if (!restrictedProjectsMap.containsKey(jiraHelper.project?.key)) return true //for all other projects, we show the menu as usual If we encounter one of the projects that are not in the restrictedProjectsMap, the script will exit early with "true" and show the menu.
-
That script will let you view the menu item if your are a member of any of those 3 groups regardless of which project you are currently in. If you want to have the group match the project, use the second script I suggested.
-
Possibly, the only mistake is in def projectKeyList = ['ABC, 'DEG'] There is a missing quote after ABC. But perhaps you can write this so it's easier to read: import com.atlassian.jira.component.ComponentAccessor def currentUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser def groupManager =…
-
I think you have 2 competing criteria "created within the current sprint" and "not set to that or any sprint" How can you know the boundary of the sprint to search by creation date if the issue is not assigned to the sprint? Which sprint boundaries would need to be compared (most environments will have multiple…
-
Are you talking about a "Issue Picker" built-in script field? If so, use a behaviour script to change the JQL based on the current project.
-
Ah... let's call this "powershell scriptrunner". "powershell scriptrunner" and "groovy scriptrunner" are two completely unrelated technologies built/managed by different companies. powershell scriptrunner, native powershell, or any other client-level scripting tool (e.g. bash on linux) can only manage atlassian web apps…
-
The only other thing I would suggest you try is [$issue.id] If that still doesn't work, you'll have to populate that field after the fact using a Scriptrunner Listener groovy script. Or contact the Elements vendor to see if they have encountered that and have a solution.
-
I've never used Elements Copy & Sync and I don't have access to it to really try. But I've working with MIP plenty. Are you trying to apply the source issue as a value in the target issue MIP? If so, I can't see why you can't use the built-in mapping functionality. In the Elements mapping, select the MIP field for your…
-
Power Groovy's implementation is very minimal and unsupported. I don't think it supports imports outside of the immediate plugin context (which probably only includes the main groovy classes). You might still be able to use power groovy to achieve what you are trying to do, but it will be more difficult. For instance, I'm…
-
If you have scriptrunner, you could build a custom web panel that will read the content of the insight field and produce a table. Otherwise, there is no built-in way to change the way multi-object insight custom fields are displayed on the issue.
-
This is not possible with Jira Asset in Data Center with built-in functionality and as far as I'm aware, it is also not possible in cloud. I built custom functionality in my jira server environment with scriptrunner to support a similar scenario. In my case it's a person/group granted permission to edit a single attribute…
-
It might be as simple an issue as a difference in letter case between the internal value of the "changeItem.getField()" and what you see on the screen. I've had no issue using setPriority() Try to either change your piorityField to "priority" or update the comparison to changeItem.getField().equalsIgnoreCase(priorityField)…
-
I'm not sure what distinction you are making between "general scriptrunner" and scriptrunner for jira/confluence. The only scriptrunner I'm aware of is the jira/confluence plugin by adaptavist that allow you to create groovy scripts to interact with the Java API of the underlying app. But to answer your questions: #1 - all…
-
You have a typo. The first instance of the field variable is dapartment ... then subsequent ones are department. But beyond that, you need to structure your nested condition a bit more: import com.atlassian.jira.component.ComponentAccessor import com.onresolve.jira.groovy.user.FieldBehaviours import…
-
I had not reviewed the web item provider functionality in a long time and never used it. But now, reviewing the documentation page, I can see that it will work better than my suggestion.
-
Not directly out of the box. You would need to use a separate fragment to inject some javascript (either web resource or web panel) that will modify the DOM. It can be tricky to have the script injected at the correct time (the custom web item has to be there before the script can act on it). Unless you use some fancy js…
-
@Darryl Lee sorry, no. Never worked with cloud.
-
Yeah, that could work. If you already have your department field, I would put this in the workflow "create" transition as a post function. Or in a listener for catching when the reporter changes. If you don't already have a department field, you could create a new script field. But ultimately, here is a snippet of code for…
-
And if you want to take care of the warning too... you can try adding something like this: client.encoder.charset = 'utf-8' But I'm not sure. I've never tried that. I just found it from the javadocs.
-
I don't think it'a content type error. I haven't worked with Slack API before, but a quick google search revealed this: https://api.slack.com/methods/conversations.create#errors See the "invalid_name_specials" error. That means your channel name "pretend-channel-4" is apparently invalid.
-
So, when executing in the listener, you get a log entry that shows the post request was successful but the corresponding slack channel isn't created? It's possible for an API to respond with a success status code, but report a failure as part of the message. Maybe you need to extract a bit more out of that response to get…
-
You should be able to apply wiki style formatting to the text assuming your environment is configured to allow that. https://confluence.atlassian.com/adminjiraserver0820/rich-text-editing-1095777774.html You may need to also enable the correct renderer in your project field config.
-
You're welcome. Maybe your longer experience would point to reasons why one is better than the other but wanted to share what pattern I would choose to reduce the verbosity of your code. Something like this: import com.onresolve.jira.groovy.user.FieldBehaviours import groovy.transform.BaseScript @BaseScript FieldBehaviours…