Comments
-
This is possibly using Atlassian's PersonService API. Here's an example script for the Script Console that gets all the unsynced users and lists their display names: import com.atlassian.confluence.api.model.pagination.SimplePageRequest import com.atlassian.confluence.api.service.people.PersonService import…
-
This is true for ScriptRunner for Jira & Bitbucket as well by the way.
-
Bit late to the answer, but the answer OP was looking for is, yes, ScriptRunner for Confluence does log Switch User actions to the audit log. You can read more at https://scriptrunner.adaptavist.com/latest/confluence/audit-logging.html
-
To say a bit more, we have an example in our documentation on how to create a page whenever a new user is created: https://scriptrunner.adaptavist.com/latest/confluence/listeners.html#_create_page_when_user_created You could adapt that script to perform the "loop through all existing users and create a page" script that…
-
Hey, @Evanthia Charalampidou ! We just published a script to the Adaptavist Library based on this exact use case. https://library.adaptavist.com/entity/comment-on-jira-issue-for-linked-confluence-pages The script presumes that you have ScriptRunner for Confluence and ScriptRunner for Jira, though you need only to configure…
-
To reply to Kurt & Michael, no offense taken. :) To say a bit more about one of the suggestions: > I would love to see ScriptRunner going in a direction where they offer more abstraction of the Confluence API. Something like the above CLI command in a kind of Groovy domain specific language This touches a topic that we…
-
A bit late getting back to the party, but shout-out to y'all for a great conversation! @Michael Scholze - the short answer is, "Yup, we've already got a feature on the backlog." See https://productsupport.adaptavist.com/browse/SRCONF-1238 ; Definitely watch/vote for that issue if you'd like to see it. If there are…
-
@Kurt Rosivatz- good question. Without getting too much into the weeds, the way we're using it isolates each page's creation to its own database transaction. That can be important to making sure the script doesn't fail in some scenarios. You can read a bit more about the TransactionTemplate at…
-
I'm admittedly rather late to the party, but this would be a good use case for ScriptRunner for Confluence's Search Extractors. A custom search extractor with the following code: import com.atlassian.confluence.pages.Page import org.apache.lucene.document.Field import org.apache.lucene.document.StringField if (searchable…
-
Some folks have done a writeup on running the Bitbucket Server installer on Server Core. They're different products, but it may be helpful prior art. https://community.atlassian.com/t5/Bitbucket-questions/Is-BitBucket-supported-on-Windows-Server-Core/qaq-p/932335
-
That helps a lot, @Sushma, thanks! This is an interesting use case. So, you could potentially do it as you are, using a scripted macro that adds a button to the page... when you click it, it refreshes. A better idea, I think, would be one of two paths: 1. Create a script macro that simply pulls & renders the information…
-
@Sushma- easiest way to debug it will probably be to put some console.log("<message") statements into your code at various points to see where execution stops and why using your browser's developer console. I'd also recommend looking in your browser's network tab to see if the call to the REST API ever gets made, and if it…
-
@Matthew Page- take a look at https://productsupport.adaptavist.com/browse/SRJIRA-3809 .
-
Hey, @Matthew Page - So, my bad on suggesting you use the request URL. I ought to have realized that the request would be to the Behaviours endpoint, _not_ the create issue page. My bad! While I do suspect you could construct the service desk URL within the Behaviour, I am beginning to think that maybe Behaviours aren't…
-
Not out of the box, though if you'd like something like that, you should vote for https://productsupport.adaptavist.com/browse/SRJIRA-2104
-
Not yet, but keep a watch on https://productsupport.adaptavist.com/browse/SRJIRA-2104, as we will update that issue when it is added to the sprint & worked on.
-
If you're an Atlassian plugin dev and found your way here, you may wish to know there are some system property flags you can use instead for your local development environment. https://community.developer.atlassian.com/t/how-to-disable-collaborative-editing-via-amps-when-developing/8057…
-
Answer: setup a Script Listener to listen for the Issue Updated event with code similar to the following (tweaked where noted) import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.event.type.EventDispatchOption import com.atlassian.jira.issue.Issue def issue = event.issue as Issue def…
-
Bit late to the party, but wanted to provide an answer I'd cooked up for a similar question: import com.atlassian.jira.bc.issue.search.SearchService import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.search.SearchRequestEntity import com.atlassian.jira.issue.search.SearchRequestManager…
-
No sweat. Here's the feature request, by the way. https://productsupport.adaptavist.com/browse/SRJIRA-2384
-
This is very curious indeed. The fact that it's keeping the rest of the timestamp indicates that the escalation service isn't causing the post function to fire, as that would update the minutes as well. I'm curious if you can reproduce this using a much simpler script... maybe one that sets some unused custom field to a…
-
It may be failing silently. Perhaps we just need to add some error handling so you get appropriate logs: import com.atlassian.greenhopper.api.rank.RankService import com.atlassian.jira.component.ComponentAccessor import com.onresolve.scriptrunner.runner.customisers.JiraAgileBean import…
-
Yup! By updating the Rank custom field. To do that, you need to access the Jira Software (formerly known as Agile, formerly known as Greenhopper...) API. import com.atlassian.greenhopper.api.rank.RankService import com.atlassian.jira.component.ComponentAccessor import…
-
Scripting Jira Portfolio is always tricky since they don't have a published Java API, but through divinations and sorcery we have discovered a few things. You should be able to add a post function to the Epic issue's workflow that automatically transitions the issue described in its Parent Link custom field. Something like…
-
To expand a bit, the javascript to read your table might look something like this: AJS.toInit(function () { let buttonSelector = 'button#myCustomMacroButton'; let button = document.querySelector(buttonSelector); function clickHandler(clickEvent) { let tableElements = document.querySelectorAll(buttonSelector + ' ~ table…
-
So, there are a few things you might be asking; I'll try to address each. Per the documentation on custom macros, there are three code blocks that define your macro. The first takes some Groovy code that should return an HTML string. The HTML will be what ultimately renders on the page, and in your case, should probably…
-
Can you post some more detail about your escalation service? It seems very likely that your escalation service is executing the workflow transition, which causes your post function to fire, but without the code/configuration of the service, I can only speculate.
-
There's nothing in Atlassian's AUI docs, which makes me think it's not a simple matter of adding a class or ID to the text area. https://docs.atlassian.com/aui/latest/docs/forms.html
-
So, I've been looking into this, and I've not quite been able to divine how to use Jira's built-in rich text editor. I'm pretty sure that the basics are: 1) Create a textarea element in your markup 2) Run some javascript that will invoke Jira's rich text editor Obviously, the particulars of #2 evade me as yet.…
-
@QQQ - You should be able to specify a link type and direction. From those docs: Specify also the link type and direction… this will normally be Clones, but doesn’t have to be. As for getting the issue keys in the additional code, sourceIssue.key should work, but it may not work unless you put it inside a doAfterCreate…