Comments
-
Where did you want to run this groovy? Is this in an insight post-function? or something similar? I'm more of a scriptrunner/groovy person. But I'm sure many things are similar. One thing that's not clear from the Post Function groovy screen is what variables are available in the script by default. But, we can use the Test…
-
You could do that with an insight read-only custom field. As part of the field configuration, the set the "Filter Assign Scope" with a placeholder For example, Let say you have Customer objects and Users objects. The User object has a Customer attribute so that Customer object has inbound references. So on a issue, you…
-
Let me see if I understand... you want to have a JSM form to allow user to submit updates to some Custom Field options. You probably want to run this from a scriptrunner postfunction. If so, something like this might work: import com.atlassian.jira.issue.customfields.option.LazyLoadedOption import…
-
Yes, normally, your web item button should have a "link" configuration. This will be the URL that will trigger some action. On an issue, you could use "run code and display a flag" ... but the framework to display that flag will not be available in the context of the release page. But the question is ... how are you…
-
This needs to be in the "initializer" server-side script The "description" server-side script only executes when the user changes the description field.
-
First, there is no such field with id "issueType" You can try "issuetype" but that will be a id (integer or long) of the issue type. Generally, I prefer to get my issue type from the issueContext variable: if(issueContext.issueType.name == "Task"){ //your code here } Also, I'm a fan of using maps as data structures... try…
-
Do you get any errors in the log when the script executes? Static Type Checking errors are not always fatal. In this case, the editor (is this the script file editor or the listener script editor field?) may not be aware of the built-in variable that the listener scriptrunner context. Other times, the static type checking…
-
What Renderer is applied to that field in your project field configuration? I think if you will use a multiline text field, you have to make sure it's a "Default Text Rendered" and not Wiki or Rich Text. Here ... I just tried on a random multi-line text field in my environment: Of course, there is no data available to…
-
"Condition" in workflow only determine if/when a transition button should be available. PostFunction happens after the transition has been initiated and passed all the validation rules (validators). So your scenario is a good fit for a post function. But you indicated that the 2 linked issues are in different projects.…
-
convertToSingleSelect and convertToMultiSelect methods in behaviours work with free text fields only. They just convert the UI to behave differently. The underlying data stored will be the key of the options map. In the case of Multi conversion, the data is a semi-colon separated string like: "Suzy; Jill; Larry". This…
-
That looks like an error from your external endpoint. http_status_coded:404 means "not found" Are you sure this URI is correct? SchneiderDev/projects/Siddharth%20Shankar/JIRA-Access-TEST%20Task
-
The fields must exist on the edit screen, not be hidden in the field configuration for the project and have a context for the project (in custom field configuration). Jira doesn't have field-by-field permissions. So if the condition above are met, you and anyone else with "edit issue" permission will be able to edit those…
-
If you look at line 17 body = [Request:[issueKey:issue.key]] The issue object is provided by the script context. You can click on the question mark below the script editor to see all the variables provided by the scriptrunner script context. So in this case, we are setting the issueKey value in the body object to the key…
-
The error is not a breaking one. "Static Type Checking" are warning that something COULD be wrong and the editor can't be sure. In this case the execution is not impacted. We can coherce the type to get the error to go away like this: def group = groupManager.getGroup(groupName as String) Have you looked in the Logs tab?…
-
Agreed. I'm only suggesting the best workaround I can think of given the feature's limitation. Beyond that, you would have to work outside of the existing functionality and build your own report somehow. A feature request would be a good start.
-
I think this is basically saying that you can't get attributes from other objects when printing a label for the current object. You would have to replicate data from your user into your receipt object if you need to include that in the label template. I don't think the mindville/atlassian team had your use case in mind…
-
I think you are very close ... try this in your second field server-side script: def field = getFieldById(fieldChanged) def val = field.formValue as String if (val && !val.matches(/(?i)(INC|RITM)[0-9]{7}/)) { field.setError("Required Format! Must be [INC#######] or [RITM#######]") } else { field.clearError() } I change how…
-
The label template is associated with the entire schema. So ALL attributes are available. But you can see some warnings in the section "Adding Placeholder" in the documentation. ou can use the Insert placeholders drop-down to add any of the attributes available for this object schema. One of the first attributes is…
-
That sounds like a decent use case for Select List Conversion using Behaviours But instead of loading the list based on user input, you query the source (could be hardcoded or some remote data source) in the behaviour initializer and apply the options using setFieldOptions. I don't think this can be formatted as…
-
Ah ok... a bit of testing on that and I found that I had a mistaken assumption.... The InputParameter, when referring to assigneeId or value for user custom fields expects the user's name, not the user's key. change "nextAssignee.key" to "nextAssignee.name" in the two places and it should work. Keep in mind that the…
-
Nice find. I'm not super familiar with the getModifiedFields() method.
-
I played around with this ... try to generate your pagebody jira macro with additional attributes {jira: key=${issue.key}|serverId=xxx-xxx-xxx-xx|server=yyy} Get the xxx-xxxx and yyy values from a macro that you insert manually. It will be the application id and name from your confluence applinks When I specify both of…
-
Normally, when you create a jira issue macro in a confluence page, it automatically creates a link back to the source confluence page in the jira issue as "mentioned in <pagename>". But that doesn't seem to happen automatically when creating using api this way. Is this what you are trying to achieve? Or are you asking how…
-
I think you can achieve that with a 2-part JQL. Unfortunately, you will need to specify your epic twice: issueFunction in issuesInEpics('key=RNA-1') or issueFunction in subtasksOf("issueFunction in issuesInEpics('key=RNA-1')") The first part will get you the list of tasks. The second part will get you the SubTasks for all…
-
Let's try this again ... Here is a scriptrunner script that will output the global permissions, which groups are assigned to them and how many users each group has: import com.atlassian.sal.api.component.ComponentLocator import com.atlassian.confluence.security.SpacePermissionManager import com.atlassian.user.GroupManager…
-
I think given your use case, I would strongly recommend using the httpbuilder approach rather than the curl approach. Then, with post function, there are a couple of things you can do for telling the user this took place. 1) You can display a flag 2) You can generate a fake history record Here is a full example: import…
-
You are correct, I obviously hadn't tested my suggestion. Like you, I can't figure out how to access the log work details submitted as part of a transition screen. But maybe I can suggest a different workaround using behaviour. It's still not perfect. This issue I have here, is that the message is only visible when you've…
-
Oops. Sorry I completely missed the tags. i should be able to get you a similar script for confluence tomorrow (I’m on my phone right now). If not I’ll share a sql query.
-
Unless I'm misunderstanding something, I don't think the existing function allows that. I would recommend making a feature request to get the reverse of the current issuePickerField function.
-
You must transmit the issue that you want to work with via the http request and your endpoint must be ready to accept this information in one of 2 or 3 ways (there may be others). If your Endpoint is a GET, then you can pass the issue via the request query parameter or request path. If it's a PUT or POST, then it could be…