Comments
-
Like Will said in the other answer, there is a built-in snippet for that. Select the "Append Parent/Source issue summary to subtask"
-
You can try to investigate the event's changeLog property to see if there was a changeItem where the status was changed. And then look for other clues in there to see if you can determine if a no-status-change transition took place (that might be harder).
-
I have a few observations to make for your scripted field script. * You don't need any imports * You don't need this line: def timeSpent = issue.getTimeSpent(); If you just want to show this calculated field for a project, it might be best to go set that in the custom field context and/or set that custom field to hidden in…
-
Another approach to achieve what Nic suggested is: def rolesToCheck = ['Users', 'Watching'] if( rolesToCheck.any{it in remoterUserRoles}) With 2 roles to check, it's not bad, but should you have a situation with a log more, having a bunch of OR groups would be tedious. But if you desire to check if the user has some other…
-
Like I said, to debug that other script, I'd have to see it. The following sql statement could be valid depending on how it's being called. SELECT FirstName, LastName from Person WHERE FirstName like ? Generally, in groovy, I use this format def query= "SELECT FirstName, LastName from Person WHERE FirstName like :input"…
-
It will be much more efficient from a coding perspective if you use a simple data structure for all your options: def optionsCodeMap = [ 'Windows Licensing': 5100, 'Application Training': 4501, 'Lenovo Laptops': 17594 ] def option = getFieldById('summary').value def prodCode = optionsCodeMap[option]…
-
Argh ... I'm so sorry, looks like I had a couple of mistakes that caused us both to waste some time. Here is an updated behaviour script for the summary: if(underlyingIssue){ getFieldByName('Employee').setReadOnly(true) } getFieldByName('Next Trigger').setHidden(true) def summary = getFieldById('summary')…
-
Create a separate entry just for the envenTypes endpoint. It should have no other code then was I suggested in my second reply. Then you should be able to access that endpoint and see the values. And optionally, app "?query=W" to get partial results. Once you can get the restAPI to work, the behaviour should work normally.
-
Here is a short script that will output all the Permissions schemes and permissions granted directly to jira-users. This won't account to permissions granted to jira-users via a project role import com.atlassian.jira.component.ComponentAccessor def pm = ComponentAccessor.permissionSchemeManager…
-
Try to disable scriptrunner in the manage-apps screen, then when you re-enable it, follow the log output in your atlassian-jira.log file for any clues.
-
The way to deal with that is to filter out any View permissions from the permissionSet. Here is an example: import com.atlassian.jira.sharing.rights.ShareRights /* ... */ def newPermissionsList = permissionsSet.collect().findAll{it.rights != ShareRights.VIEW} newPermissionsList.add(new SharePermissionImpl(null,…
-
It doesn't look like your rest endpoint is registered correctly. Maybe you have other code outside the range of what was visible in the screen you shared. Here is my endpoint script code and what it looks like in the list: The list entry should include a link to the endpoint
-
And what do you see on the list of REST Endpoints (after you save the endpoint)?
-
Can you share a screenshot of your REST End point configuration and the Rest Endpoint list.
-
First thing first though, can you access your rest endpoint now?
-
Add import javax.ws.rs.core.MultivaluedMap To your REST Endpoint script.
-
Have you not tried to just output the result of your calculation? if(issue.timeSpent){ return issue.timeSpent * 2.1 as Long } Make sure you select "Duration" in the script field template. Maybe you were missing the "as Long" to eliminate any fractions of seconds as a result of the multiplication.
-
Are you able to access your newly created endpoint? What happeds if you points your browser to <jira base url>/rest/scriptrunner/latest/custom/enventTypes Can you see any errors in your chrome developer tools?
-
You are mixing apples and organges here... If you want to define a custom rest endpoint to use in a selectListConversion, you have to do that in the Rest Endpoint section of scriptrunner. That rest endpoint script would serve only 1 purpose, output your list of options. If you're going to do that, you need to follow the…
-
I'm not sure how advisable it is, but it's possible: def options = [ "" : "Select a value...", //if you want to default to no selection, otherwise, the first option will be selected "Windows Licensing" : "Windows Licensing", "Application Training" : "Application Training", "Lenovo Laptops" : "Lenovo Laptops" ] def summary…
-
If you only want to validate when the fields are not empty, you can add some logic like this: if(fieldA.value && fieldB.value){ if(fieldA.value == fieldB.value){ currentField.setError("Please select a different user. $currentField.value was already used.") } } or combine it: if(fieldA.value && fieldB.value && fieldA.value…
-
I see nothing there that explains your behaviour. I don't think this is supposed to happen. It's probably time to contact Atlassian Support.
-
Can you share a screenshot of the Insight Configuration for your "Aplicativo" custom field? The only guess I have is that the field has a "strict" assign rule that's based on the "Tipo de Activo" attribute which breaks when you remove the attribute and causes the strict assign to not be able to find the correct object…
-
The export file is a Zip that contains several XML and CSV files. The XML contains the schema definition and other environment information and the CSV contain the object data. I think your best solution is to create some sample data in a server instance (you can install a trial or use the Atlassuan SDK to create a local…
-
Yes, I meant "object created/updated". I have not tried to use the object history as a way to determine the most recent event. That might be a good choice. My feeling is that automation will always be a little bit behind the history creation. I've had times where automation was queued for several hours (after a large bulk…
-
Do you mean delete the attribute from the object type, or remove the attribute value for the single object? Because either way, I'm not seeing the behaviour you describe Here is a jira view of an issue with Employee custom field that points to an Insight Object that contains "test attr". After I completely delete that…
-
Try to add a bit of logging... Just above 'def user = ' add: log.info "Reading row: $row to extract $row.user" This will hopefully give you some clues.
-
I think you have all the clues you need in my original answer. You are using "getFromString()" on the change item. That's the value BEFORE the change. So by definition, it will be null when change from nothing to something. So try to use getToString() instead.
-
You can find all the details about whether your server and database are supported here. From what I can tell, you're okay on that front for any versions except perhaps for upgrading your Oracle JDBC Driver. Beyond that, my preference is to start by upgrading all the add-ons to the latest available version for the current…
-
Yeah @Nic Brough -Adaptavist- I made some assumptions about where the OP was attempting to go based on some of the code they had already written. Since the code was already attempting to get all the groups that have BROWSE permission, I just fixed the part of the code that was comparing the list for a given project against…