Comments
-
Hi, We have an example script on our new website of how to programmatically create a sub-task for a parent issue. See the script here: https://library.adaptavist.com/entity/create-a-subtask-and-link-to-parent-issue-in-jira Regards, Josh
-
Hi Neil, You might try adding the "None" option back like so: //Participation Type Field Options def ParticipationTypeCF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_14911"); def ParticipationTypeConfig = ParticipationTypeCF.getRelevantConfig(getIssueContext()); def ParticipationTypeOptions…
-
Hi Akbar, The field would need to be on the screen for the behaviour to work. You could try setting up a Simple Scripted Validator on your workflow transition instead. See this page: https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/validators/simple-scripted-validators.html Regards, Josh
-
Hi Pawel, I don't think you would want to use a behaviour in this scenario. Adding a watcher to an issue doesn't seem like something that needs to be done instantaneously based on what's currently on the Edit form, which is what behaviours are good at. Further, behaviours won't work at all if someone inline edits the field…
-
Hi David, Would it be possible for you to copy and paste your reply above and put it on the ticket that I linked? I think that you might have some valid points, but I think it would be helpful to continue discussion on that ticket so that all members of the dev team can see it. Much appreciated, Josh
-
Hi Krasina, Glad to hear you resolved the problem! Regards, Josh
-
Sure! 1. I think this is best explained by the Atlassian docs here. Essentially, the IssueChangeHolder defines a simple object that can contain the changes that have occurred to an issue. 2. updateValue() is necessary for listeners because it actually updates the issue in the data store. setCustomFieldValue() will set the…
-
Hi Krasina, There are many things that can cause this. Can you run this in the script console within JIRA and then tell me what it returns? import com.onresolve.scriptrunner.fragments.FragmentsManager import com.onresolve.scriptrunner.runner.util.AOPropertyPersister def frags =…
-
Answered through our support portal: import com.atlassian.jira.component.ComponentAccessordef changeHistoryManager = ComponentAccessor.changeHistoryManagerdef currentStatusName = issue?.status?.namedef item = changeHistoryManager.getChangeItemsForField (issue, "duedate").reverse().first()return new…
-
Hi Nico, Glad to hear you got it working! :) Thx for using ScriptRunner. Regards, Josh
-
Hi Edwin, Glad to hear you got it working. Nice work! Regards, Josh
-
Hi Jacob, We have good examples of how to set custom field values here: https://library.adaptavist.com/entity/update-the-value-of-a-custom-field-using-a-listener https://library.adaptavist.com/entity/update-the-value-of-a-custom-field-in-jira Regards, Josh
-
Hi Mark, I don't work on the TM4J team, but I'm sure they'd be happy to help you answer your question. You can find the support portal here: https://marketplace.atlassian.com/apps/1213259/test-management-for-jira?hosting=server&tab=support Regards, Josh
-
Hi Michael, I believe that JavaScript would be used as a Script Fragment, specifically a Web Resource. Let me know if you can get it working as a web resource. Regards, Josh
-
@Stephen Schaff could you also raise a support ticket through https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=server&tab=support We would be happy to help you there as well.
-
Hi Nico, 'users' is a list of user objects, yes? You won't need to use the userManager because 'it' is already going to be a user object. Also, I think you have to set the Approvers field with a list of users. See if this script works import com.atlassian.jira.component.ComponentAccessor import…
-
answered here https://community.atlassian.com/t5/Jira-questions/Copy-custom-field-select-list-from-parent-to-child-with-listener/qaq-p/923827
-
Hi Cristian, This is not currently possible at the moment in ScriptRunner using behaviours - please see SRJIRA-2986 for information. Note that although that ticket is closed as Won't Fix, the development team will be working on a new system of custom picker fields that will provide equivalent functionality of limiting…
-
Hi Edwin, It is possible I am misunderstanding, but I don't think you would want to use a behaviour in this scenario. For adding labels to a parent epic, that doesn't seem like something that needs to be done instantaneously based on what's currently on the Edit form. Further, behaviours won't work at all if someone inline…
-
Hi, I made a few modifications to your script and it seems to work fine. import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.ModifiedValue import com.atlassian.jira.issue.util.DefaultIssueChangeHolder Issue issue = event.issue if (issue.issueType.name…
-
Hi David, Unfortunately, I don't think we do. See https://productsupport.adaptavist.com/browse/SRJIRA-2247 Regards, Josh
-
Hi Edwin, Yes, those still work. What are you trying to accomplish with your script? Can you post your entire script here? The server side script will be ran once when the form is loaded and then every single time the field is changed. Regards, Josh
-
Hi @Patrick Schuh [brainbits] Which version of ScriptRunner are you using? Can you submit a support request through our portal? https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=server&tab=support Regards, Josh
-
Hi Mariana, We have example scripts on our new website that detail how to set custom field values. Take a look here: https://library.adaptavist.com/entity/update-the-value-of-a-custom-field-in-jira Have you actually tried running the script? The static type checker may tell you there's an error, but it'll probably work…
-
Hi David, Sorry to hear that it didn't work. Would you mind raising a support request with our dedicated support team? I think that they will be able to give your issue a deeper look. You can find the link to raise a support request through our portal here:…
-
Hi Alvin, Can you please clarify with what you are saying about assigning a group to an issue? As Tarun mentioned, you can only set one person as the assignee, not a group. You could add all the users in the group as watchers. You could also have the post-function send a custom email to users in that group to notify them.…
-
Hi David, I know you said the problem was sporadic, though I would like to follow up to see if you've experienced the same problem within the last couple of days. Has the DO_NOT_DISPATCH EventDispatchOption seemed to make a difference? Thanks, Josh
-
Hi David, My best guess would be that this line that updates the issue issueManager.updateIssue(event.getUser(), mutableIssue, EventDispatchOption.ISSUE_UPDATED, false) is causing the listeners to be continually invoked because of the event that it dispatches. Your listener listens for the "Issue Updated" event - that's…
-
Congrats all!
-
Hi Haddon, Instead of filling the field with a brief description, what if you just use the field description instead? You can use the setDescription() method in the behaviour script for the 'business impact' field like this: def formField2 = getFieldByName("TextFieldA") formField2.setDescription("<b>Please enter XYZ…