Comments
-
@Salim Hammar I don't think there is a way to block component creation. If a user has Project Administrator permission, he can create components. Sure, you can delete components right after they are created. For this you'll need a listener which would monitor the ProjectComponentCreatedEvent…
-
@Salim Hammar To delete a component you need to call the delete(Long componentId) method from: https://docs.atlassian.com/software/jira/docs/api/7.6.1/index.html?com/atlassian/jira/bc/project/component/ProjectComponentManager.html
-
@Salim Hammar If I understand your requirement correctly, you have a listener that monitors component name changes in one project and updates components with the same name in other projects to keep them all in sync. If the above is true then you have a logic problem in your code. Specifially here: def componentTemp =…
-
Well that's because 'issues' variable is not declared in your script. As is 'emails' by the way. It looks like you took only a part of my code and expect it to work like this. It won't. What you should do is configure a scripted job and make it run the code I provided in its entirety. Check this documentation for more info.
-
Try the code I provided above, should do the trick
-
@RichardA It seems the problem is in this line: def id = ("Email Address: "+userSelected.getEmailAddress()); First off, the value doesn't really make much sense. Secondly if your want to use this variable outside of your cycle then you need to declare it outside first.
-
Hi @RichardA Sorry for the delay. The code for your service should look something like this: import com.atlassian.jira.bc.issue.search.SearchService import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.issue.fields.CustomField import…
-
Please advise the version of Jira Server and Scriptrunner that you are using.
-
A scripted service seems to be the solution here. Here's the logic: 1) Create a service that runs once at the start of each day (say 0005 am). 2) Make it run a JQL search using this query: "Approver Date" >= startOfDay() AND "Approver Date" <= startOfDay(7) This way it should only return issues which have less than one…
-
Hi, It definately is possible. Here's the general idea for how this can be done: 1) When a field is set, call Confluence REST API to create a page. 2) Create a link in your issue leading to the page that's just been created. I guess a scripted post function could do the trick. You'll need to write the code for it to…
-
Hi, @ayala nayman Something like this should do the trick: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.event.type.EventDispatchOption import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.user.ApplicationUser…
-
Hi, You'll need to use Confluence REST API to do it. * Locate an example page with the template applied. * Scrub that page via a REST API call using the following endpoint: GET /rest/api/content (This will allow you to get the storage format). * From this, pass the storage format to your create call using this…
-
Hi @Jorge Pino , here's the deal. The thing with getCustomFieldValue(customField) method is that it returns different types depending on the type of custom field object passed into the method. For example if you call this method on a user picker type field, you'll get an ApplicationUser object. A text field will get you a…
-
True, but while you wait for Adaptavist to fix it, you might as well use my solution as a workaround. Up to you really.
-
Hi Richard, What you need is a scripted validator that would run a JQL search and if that returns any results then show an error to the user. The logic is as follows: 1. User enters some artefact id on a transition screen 2. A JQL search is ran with the following query: "Artefact ID = ${artefact id from screen}" 3.…
-
Hi, You need to pass 'maxResults' parameter to your query, like so: https://yourjira.com/rest/api/latest/search?maxResults=500 Also, please take a look at this ticket.
-
Hi, Assuming you are talking about JQL functions you can use endOfWeek(-1), endOfMonth(-1) and endOfYear(-1)
-
Hi Jorge, I think this article might help you.
-
Hi Eric, You can call this REST endpoint from your script to get SLA information for your issue.
-
Hi, A scripted field seems to be the solution here. If you could explain your use case (what data you have and how exactly you want this to work), I might be able to help you with the code.
-
Hi Cammie, Yes, you can. You need to use the same screen scheme across your projects. More details in this documentation.
-
I see. Try using /rest/projectconfig/1/workflowscheme/{projectIdOrKey} endpoint to get a workflow scheme for a project. Response contains, among other things, a list of workflows the scheme contains and their mappings to issue types.
-
I see. If this is the case then all you need to do is update JQL behind that filter to exclude all closed issues.
-
Hi Sandra, I thinks this documentation is what you are looking for.
-
Hi Melissa, If by "Closed" you mean when an issue has it's resolution set, then you can disable all notifications for 'Issue resolved' event in your notification scheme. As far as watchers are concerned, a post function can be configured to remove all watchers from the current issue when it's moved to the 'Closed' status.…
-
Hi, I think you came across a known JSD bug, which prevents service desk type projects from being created if the default language is set to Russian. Check this ticket for more details. The workaround is to change you default language to English, create a project, and then change it back to Russian. It's rather annoying I…
-
Hi Priya, I'd look at some add-ons that provide a good selection of built-in workflow conditions, validators and post function. Add-ons like JMWE, Jira Workflow Toolbox, Jira Suite Utilities and such.
-
Ok, In this case I suggest looking at JMWE add-on. Among other things, it has a built-in post function that allows you to copy field value from one issue to another (parent to sub-task, sub-task to parent, linked issues, etc). So basically all you'll need to do is set this post function on your sub-task's 'Create'…
-
Hi Zack, This is configured in Project Settings -> Request types. More info in this documentation.
-
Hi Alex, I assume that by 'Associate' you mean either assign a sub-task to a specific user or set a specific value to a custom field. In any case, basically what you need is a post function on your sub-task's 'Create' transition, that would check the parent issue, check to whom it "belongs" (my guess is that you have a…