Comments
-
7k record in a single table is nothing for a correctly configuraed mysql db. In one of my dbs, I have almost 9k records and amlmost 100 columns I can retreive all the data in under 1 second. There has to be something else wrong either with your connection to the server or the data structure. Maybe you have large columns.…
-
I mean combine them into a single query. This returns all the issues that are in a sprint sprint is not empty Then this returns all the issues that are missing one or the other of the estimates you care about: "Story Points" is empty or timeestimate is empty Combined together, you will have all the issues that are in a…
-
There is no such thing as "Sprint Create Date" in the system. The Sprint entity contains 3 dates only: Start Date, End Date, Complete Date It is possible to create a new issue when the sprint is created and assign that issue to the sprint immediately. But what you need to store in your custom field will be the current…
-
I think doing this in the console is the correct approach. Here is a script I quickly put together (not quite fully tested), so verify in a staging environment: import com.atlassian.jira.bc.issue.search.SearchService import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.ModifiedValue import…
-
You have to use "simple scripted condition" to be able to leverage the cfValues. Here is the same script with both the start and end date. import com.onresolve.scriptrunner.runner.customisers.PluginModule import com.onresolve.scriptrunner.runner.customisers.WithPlugin import…
-
If you configure an issue listener with a "Sprint Created" or "Sprint Started" or any other Sprint-related event, the event object should include a Sprint object. So you can grab any of its values: def boardId = event.sprint.rapidViewId def sprintName = event.sprint.name def sprintId = event.sprint.id def sprintStartDate =…
-
I was seeing a similar difference and found that in order to get a user pick list and see the full display name of the selected user, the current user must meet the following two criteria: 1) Have a service desk license 2) Have Service Desk Agent permission on the project If either of those conditions fail, the user can…
-
One person's nightmare.... Here I just whipped this up (took about 15 minutes) import com.onresolve.scriptrunner.runner.customisers.PluginModule import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade import…
-
It's great to have the ability to use scripting to meet requirements. But it still adds some maintenance overhead. So if you can meet your requirement without scripting, that's always best.
-
Try to break it down... for me, all three of those work: * timeestimate IS EMPTY * "Story Point" IS EMPTY * Sprint IS NOT EMPTY Then combine them back together.
-
You can use a Condition in your Approve transition to ensure that only the user in the Approvers custom field can see the Approve button.
-
If you add "Story Points" and "time tracking" in "Field Required Validator" in the workflow and remove "Required" in field configuration, you should get a visible message when the user tries to Create issue and forget one or the other. The active sprint is not started until the story point and time tracking is there" I…
-
Hi John By customer, do you mean jira users? Customers in Jira usually refer to Service Desk Customers. They don't have access to Jira Software functionality and should never be able to create sprints. I am not sure what your goal is. What do you mean by "load up the issues that do not have story points"? Do you want to…
-
Can you share some of your concrete examples? Here is a console example, that works just like these links describe: I can't imagine why behaviours would work differently.
-
Is this your complete script? I wonder if you have a scoping issue since you didn't declare iAmount. But regardless ... you wrote Java for a tool that's designed to leverage groovy ... try this script instead: import com.atlassian.jira.component.ComponentAccessor def cfInvAmt =…
-
That's quite simple... just use groovy string interpolation: def newSummary = "Tested: $parentIssue.summary" getFieldById(SUMMARY).setFormValue(newSummary) Any string delimited by double quotes can include variables or object values defined from elsewhere in the script. Just prefix it with a $. If the expression you want…
-
No, this will only work when you have a form/screen with editable fields. Either on Edit or during a Transition. If you have a transition with a screen, moving between columns on the active board will trigger that form and the behavior script will take effect. Now, if you change the sprint via drag/drop (true also of bulk…
-
Have you tried using TimeCategory? Try this: import groovy.time.TimeCategory def fixVersions = issue.fixVersions if(!fixVersions) return true //there are no fixversions on the issue if(fixVersions.every{!it.startDate}) return true //all fix version have no start dates def branchDate = use(TimeCategory){…
-
As far as I know, you have to manually create it. The export/import tool only deals with full schema and can't merge a schema export file into an existing schema. And there is no export tool to only export the configuration of a single object type or a subset of the object types. It's a pain, I have 3 environments.…
-
It would help if you included the first few lines of the script to make sure you didn't make a typo in the imports. Also, where is this script box? Because you can't use annotation anywhere other than in the Script Console. If you try to use them elsewhere, errors would not be surprising. Even if there are no errors, the…
-
What type of custom field is your "Customer" customer field? Is it a single select? If so, then the "getCustomFieldValue" will return an "Option" object. Your toString() method will coerce that object to a string using the optionId. toString() is rarely the correct or more reliable way to extract data from an object. Try…
-
Are you familiar with using the JavaDocs? This console script will return a IssueSecirtyLevel object. You can access that from the console with the CTRL-J shortcut If you go to the link I just provided, you will see that such object has a getId() method. Because we are using groovy, we can access the getters without the…
-
You'll need to fetch the IssueSecurityLevelManager to lookup your levels and filter for the correct one by name. For example: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.security.IssueSecurityLevelManager def customFieldManager = ComponentAccessor.customFieldManager def…
-
If you store the file in your scriptrunner script root: e.g. <jira-home>/scripts/com/acme/scripts/helpers/InsightUtils.groovy) Then in any other script runner script in jira, you just access it with import com.acme.scripts.helpers.InsightUtils InsightUtils.getObjectByKey('KEY-123') The same with intellij, just save the…
-
Yes, terminate the simple scripted validator with a true/false statement to indicate whether the validation passes or fails. A true value means the validation passed and no message is displayed. A false value mean the validation failed and the Error Message you configure in the Simple Scripted Validator form (below the…
-
To access the parent issue from a simple scripted customfield, you have to use the full api, you can't use cfValues["fieldName"] shortcut. For example: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.customfields.option.Option def cfm = ComponentAccessor.customFieldManager def cfId =…
-
Here is a jsoup implementation that's more explicit and will get the text elements of each column: def map = soup.select('table')[0].select('tr').tail().collectEntries{row-> def cols = row.select('td') [(cols[0].text()):cols[1].text()] }
-
If you want defect for Bug and all-but defect for non-bug, then the flow of the script could look a little like this: def allowedSubtasks = [] if(parentIssue.issueType.name == 'Bug'){ allowedSubtasks = allIssueTypes.findAll{it.name == 'Defect'} //since there is only 1 available subtaks, might as well select it…
-
Hi Welcome to the Atlassian Community. I don't think you need to build new screens etc. You can use behaviour to manipulate the list of issue types offered in the drop down. The trick is that you need to get information about the parent issue (to know which issue type to show or hide). And you'll want to make sure that the…
-
If you have your user object type connected to LDAP Import, you could just map the ldap attribute that contains your username to both the "name" and the "user jira" insight attribute and all the existing objects will be refreshed with the jira account. You don't need to use automation for it. To have 1 field populated on…