Comments
-
It would help to know the type of each of those custom fields and see more concrete examples. Also, does ProjectA-Key contain a project key? Or does it contain an issue key that happens to belong to Project A? But something like this should put you on the right track: import com.atlassian.jira.component.ComponentAccessor…
-
I used Postman to create a successful post... then used its code snippet output to show what that would look like in "Powershell - RestMethod" It looked like this: $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("Authorization", "Basic blahblahblah")…
-
Try it like this: import com.atlassian.jira.component.ComponentAccessor def isDeveloper = isUserMemberOfRole('Developers') if(isDeveloper) return false //stop the condition check immediately def workflow = ComponentAccessor.workflowManager.getWorkflow(issue) def actionName =…
-
Here is some sample code for sending an email via the default jira mail system import com.atlassian.jira.component.ComponentAccessor import com.atlassian.mail.Email import com.atlassian.mail.MailException import com.atlassian.mail.MailFactory import com.atlassian.mail.queue.SingleMailQueueItem import…
-
You don't need to use the JQL. That's a bit round-about. You just need to use the issueLinkManager to find the linked issue. In your "Condition and Configuration" box add the following def linkedIssues = issueLinkManager.getLinkCollectionOverrideSecurity(issue).allIssues if(!linkedIssues){ //this will skip the execution of…
-
I don't think we can modify SearchValue and DIsplayValue indenpendently. From a java object and db entiry standpoint, there is no such attributes. You can change the value of the attribute, and insight will calculate the searchValue and displayValue accordingly. In this case, you want to send a user object. Either with the…
-
Try to run issueObject.setProjectObject and issueObject.setIssueTypeId BEFORE you call getRelevantConfig(issueObject). At the moment, when you get the relevant config, jira will not know which context to retrieve since the issue object you are passing doesn't have a project or issue type yet. import…
-
The closest I was able to find is https://docs.atlassian.com/insight/9.1.9/
-
I would use a map object rather than a series of if-else or switch. Try something like this: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.event.type.EventDispatchOption import com.atlassian.jira.issue.index.IssueIndexingService import com.atlassian.jira.util.ImportUtils def im =…
-
In behaviours, you can read a value or set a value on an Insight Custom Field, but you can't control the look/feel or visible list of results. Thankfully, Insight custom field provides this functionality out of the box. Create a new "Select" attribute in your Insight object type with a name like "Type of System" and in…
-
You are overcomplicating things I think ... Let me check if I understand your requirement.. you want to select an option in a cascading select that contains a list of Project Keys. The option to select will be determined by an issue link of a specific type. What happens if you have more than one link of that same type? Do…
-
What you are getting is an ArrayList of "objectBean" objects. In your case, there is a single value in that list. The array list and the object bean happen to have some default string representation that causes the output to look like "[Alabama (IAS-575858)]" If the attribute you want happens to be the Label (or if you're…
-
Here is a sample listener script that looks for changes in the "End Date" field and updates the "Another Date Picker" field with the same date found in the End Date field. import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.util.ImportUtils import…
-
What do you mean by "filter on the user that made the change"?
-
In a behaviour, you will only have "underlyingIssue" after the issue is fully created. During create I'd recommend you refer to "issueContext" instead if you need the project key. This will always work. def projectKey = issueContext.projectObject.key
-
I'm not sure I fully understand your use case. Maybe you can write up a separate post and give me more context on what you're trying to achieve. Feel free to @ me in your post.
-
No, I don't off the top of my head. But the way I'd find out is to monitor the logs closely and perform a sample export myself and see what gets logged (if anything).
-
Generally, only things that change the underlying configuration/data is audited. I don't think that can be modified. The only way would be to disable the built-in export functionality and build your own that includes an explicit call to create an audit log. But there are so many ways that issues can be exported (using REST…
-
Try with if(!changeItems.any{it.field == 'Component/s'}){ return //nothing to do when Components is not changed } Generally, the changeItem field is the same string that you'll see in your audit history tab for your issue. If you see something else inf your instance, try with that.
-
You should be able to devices to users in your CMDB import. Assuming your device data includes some owner identified, just make sure that identifier exists on your user object type as an attribute and the device has an owner attribute that maps to the user object type, in the import, you can specify how to identify the…
-
issue?.issueType?.name in ['issueType1', 'issueType2', 'etc'] import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.security.roles.ProjectRoleManager String roleName = "Administrators" def projectKeysToRestrict = ['ABC', 'CDE'] def issueTypesToRestrict = ['issueType1', 'issueType2'] if…
-
I'm assuming this is an "Issue picker" type of field you've created via the Scriptrunner fields. Then you can use the "Configuration Script" portion of the Scripted Field configuration to tell what JQL to user. Here is the documentation for this feature This is what you want to add to your config import…
-
Be careful, I fear that your current code might run with every event update whether the component is modified or not. Unless there is a new feature in ScriptRunner in a version that I have not upgraded to yet, the following is NOT a built-in function and probably doesn't do anything: def changedFields =…
-
I can't see anything wrong with your update method. B I'm not sure what's going on with your while loop, however. And maybe some part of the script is missing. I don't see when "user" is defined and where "findFieldsMentionedInChangeLog" is defined. The whole thing can be simplified to: /* get the changed fields above */…
-
Here is some documentation on the atlas-run-standalone command Something like this should work: altas-run-standalone --product jira --version 8.13.20 Then, when it's running go to the application & license page and install JSM
-
I've never used Okta, but a quick google search shows that they have an LDAP agent that can convert LDAP calls to their API. So yes, if you create a User schema, you can import all your identity information from OKta. As part of that schema, if you have an attribute of type "User" you can map any Okta attribute that maps…
-
What errors do you get when you execute that script? Not all errors in the editor are real. Most "static type checking" errors are just warning that the editor in unable to confirm the type of the object in question (in this case "it" an element of the projectsWithGroup) and therefore can't confirm if the property or…
-
I always install jira from the Zip archive (in linux). I don't think that ships with a bundled java. Maybe this kbase article can help you switch java version:https://confluence.atlassian.com/jirakb/change-the-java-version-used-by-jira-server-765594330.html Yes if you share the grab error with your sysadmins, they should…
-
I have so far avoided installing custom jar files in the lib directory manually. This makes upgrades so much simpler. What may happen here is that your library is either not correctly registered or overwritten by some other dependency. Instead, I'd recommend you import it dynamically in your script with a grab statement;…
-
Here is how I would do it def plannedVersionField = = getFieldById("customfield_10000") plannedVersionField.clearError() def goingToImplementing = destinationStepName == 'Implementing' def comingFromRFM = underlyingIssue?.status.name == 'RFP def valuesThatRequireChange = ['Unknown', 'Backlog', 'Test A'] if(comingFromRFM &&…