Discussions
-
Retrieving Objecttype Attributes using REST API
I am using ScriptRunner to try to manipulate Asset objects. I want to get the list of Attributes defined in my schema. When I run the following code, I get back the Scheme information: get("${base()}/objectschema/2") .header('Authorization',auth()) .header('Content-Type', 'application/json') .asObject(Map) This results in…
-
Triggering an Automation For Jira rule from a workflow
Automation For Jira is an awesome part of the Jira toolbox. So awesome in fact that some of my clients don't purchase other apps that could make my life easier when I am implementing their business processes. One of the problems that I recently had to solve is how to trigger an Automation For Jira rule from a…
-
Creating issues in Automation For Jira when you need to set the Project dynamically
Recently, I had a requirement to create a series of linked issues in different projects as part of the automation for a client's business process. Being a software developer, it pains me to write the same code over and over, like a list of "Create Issue" and "Link Issue" actions, each identical except for the target…
-
ScriptRunner loadClass question
I have a script structure that might look like this: scripts/ my_main_class.groovy my_class/ my_class1.groovy my_class2.groovy From "my_main_class", I want to instantiate either "my_class1" or "my_class2" depending on a variable. I am trying use the following: def cname = 'my_class1' def a =…
-
How do I create a plan for future dates with Auto-Schedule?
I have a simple plan with 4 Epics and several stories under each. I have created estimates for each story and I want to see how these will lay out on my schedule with a future start date for the project. When I click on Auto-Schedule, it changes everything to start today. I have tried setting the start date manually for…
-
SOLVED: attach a file using REST from scriptrunner
I have created a very simple test script to figure out how to attach a file to an issue. The "file" is actually just text that I want to create a file. Since this is in the Cloud, I am assuming that I can't write the file to a temp file in order to import it. import org.apache.http.entity.ContentType; String text = "This…
-
Assets implementation question - Multiple responses
I have a requirement to create Request Type for a JSM Portal in which the user can select multiple Objects and for each one, I need to allow them to select an Object to link to it. For example, (this is not the real case): I am working with two ObjectTypes in my Schema: Laptops and Users. The user is able to select up 10…
-
IIS Proxy Issue with Project Sidebar
I have configured IIS as a reverse proxy according the instructions at this KB. Everything works as expected EXCEPT the sidebar fails to load, which means that we can't see queues or other JSM features. We can load issues, dashboards, etc. The only thing failing is the sidebar. When I look at the .HAR output, I see the…
-
Using Insight as an Object-Oriented Database (Part 1)
As a Jira Administrator, you may not think too much about object-oriented databases. In fact, the only time you may think about a database at all is when you have to contact your DBA to get them to do something. In this article, I want to suggest that you might want to think about the kinds of objects that you need to…
-
Checking Plugin Usage in Post-Functions and Custom Fields
The Atlassian ecosystem is one of the great features of using Atlassian tools. There are thousands of apps created by third-part developers that implement solutions for an almost unlimited number of business needs. This is a huge strength for Atlassian because no single vendor can satisfy every customer need. That is where…
-
JIRA Behaviour change one field based on change to another
I have worked through how to use Behaviours to update a select list options at form initialization. I think that there should be a way to update the select list options based on a change to another field on the screen. I think that this should be part of a condition, but I can't figure out how this gets configured in the…
-
Cleaning up Inactive Workflow Schemes and Workflows
As an administrator of many different Jira Server/Data Center environments, I try to keep my environment tidy. One of the tasks I most dread is having to clean up discarded Workflow Schemes and Workflows. You know the ones that hide in the Inactive pool. You delete one and then you have to scroll back to the bottom, open…
-
Import Holidays into an SLA calendar
For those of us who administer Service Level Agreements (SLAs) in Jira Service Desk , the ability to associate a calendar with an SLA is critical to configuring the SLA. Out of the box, JSD comes with 2 calendars: a 9-5 weekday calendar and a 24x7 calendar. For most of us, this is all we need. When you configure a…
-
Can a ScriptRunner validator be run as a privileged user?
I have a validator expression but it requires elevated permissions because I am trying to retrieve the Project Roles of the current assignee to ensure that they are in an appropriate role for assignment. The script is pretty simple: roles = "Role A, Role B, Role C" issue.assignee.getProjectRoles(project) .map(r => r.name)…
-
Iterating over a variable list in Automation for Jira
Is there a way to iterate (loop) in A4J? I want to create a set of sub-tasks, but the number of sub-tasks will be determined from the parent. Simple example - the Requester enters a number (say 4) and my rule will create 4 sub-tasks. Any thoughts on how to accomplish this?
-
Does Forms in Jira Cloud have a changelog for the form data?
Jira issues have an audit log so that you can see who changed what field. Does the same thing exist for the Forms?
-
Using Insight as an Object-Oriented Database (Part 2)
In my last post, I introduced the idea of using Insight as a general-purpose Object-Oriented database to allow you to extend the Jira data model to capture information about objects and not just about issues. In this post, we will look at how to model Facilities in Insight so that you can create a simple Facilities…
-
Unimplemented Operation on BoardAdminServer.update
I wrote the following script to add "jira-administrators" group as a board administrator. This runs in the ScriptRunner console but fails with a java.lang.UnsupportedOperationException: Not implemented at com.atlassian.greenhopper.service.rapid.view.BoardAdminAOMapper.update(BoardAdminAOMapper.java:73) error on the last…
-
Email with missing attachments
This is a very short blog to report on something that one of my clients found. It seems important enough and hard enough to detect that it is worth making available to the Atlassian community. My client suddenly found that emails with attachments were being processed without the attachments. They were seeing an error…
-
Script to list Customers in a project
Can you point me to an API or approach that will return a list of customers in a specific service desk? I can get the customers associated with the organizations. I don't see any API that will return the customers who are not associated with an organization.
-
ProForm form: Form does not attach to ticket during ticket creation
We are using ProForm Lite to have our users submit a form on the portal. I have written a script that reads the form and generates an email from the form contents. For those who are wondering, the form is created as a property on the ticket. I retrieve the issue property and parse it into my email. The script works…
-
After using GroupManager to add/remove groups, getGroupNamesForUser returns old values
I have a script that I use to add and remove users from groups. At the start of the script, I call ComponentAccessor.getGroupManager().getGroupNamesForUser(user) to get the current list of groups for the user. After I have added and/or removed groups, I call it again. Instead of showing the new list of groups, I get the…
-
Resetting an SLA through automation
One of my clients had asked for a solution for how to send an email to the assignee if the issue had been sitting in a certain status ("Needs Attention") for longer than some specified time. The first thought was to use a filter and a subscription, but that didn't work because the assignees aren't all in the same group and…
-
Using Insight as an Object-Oriented Database (Part 3)
In my last Blog, I described how to model our Facilities and Equipment for our Facilities Management Service Desk. This week, we are going to create the Jira custom fields that will allow us to put those objects into our Jira tickets and use them to assist our users in providing us with accurate information about their…
-
Can ScriptRunner custom post-function cause transition to fail?
I can't find an answer to this question in the Adaptavist documentation: I want my transition to fail if my custom post-function script fails. Is there a return code that will cause the transition to fail?
-
AWS GovCloud -2021 Version
Looking at the Confluence page Getting started with Jira Data Center on AWS | Administering Jira applications Data Center and Server 8.17 | Atlassian Documentation, I see the following notice referring to AWS GovCloud: AWS GovCloud is not for production Our Quick Starts are also available on AWS GovCloud regions, but only…