Auto assign to team lead/developer on bug reopen - jira

In my implementation of JIRA, I have a custom field called Developer which gets populated automatically (username) whenever someone move the JIRA from Open to Fixed state. Now I want something similar for the Fixed to Reopen transition. That is, whenever the tester changes the status to Reopen, it should go back to the Developer or the Project Lead (in case the field isnt populated as the custom field can be overridden).
I tried to implement a post function, but there isn't a way where I can use OR criteria. Or is there a way?

You can do a Post Function on the transition using the Script Runner plugin if its a self-hosted JIRA instance which will allow you great flexibility in the logic to fill the target field in.

I finally managed to find a workaround for this.
Download the Workflow Enhancer for JIRA plugin (FREE). You would also need JIRA Suite Utilities (I had it installed already for some other customization)
In the Fixed to Reopen transition, add a Post Function and use Copy Value From Other Field to update Assignee from Developer field
Then add another Post Function underneath this where you need to use Universal Post Function. Here make the boolean condition as {Assignee}=="" and select Choose post function to execute: as Assign to Lead Developer
Publish the draft.

Related

update approvers to jira incident via api

I want to raise jira incident with approvers using rest api. I am unable to do so as i am getting below error:
customfield_XXXXX can not be set. it is not on the appropriate screen
I assume I can not add approvers while creating incident. I am using curl to raise incident.
If I try to manually create an incident, I don't get any options to add approvers, but once jira is created, I can see the option to update approvers manually from web ui.
Is there a way I can update an already raised incident with the correct approver name?
The Jira version we are using is v8.5.5.
The reason you cannot add approvers when creating the issue is that the approvers field does not exists on the screen which assigned to the create context of the screen scheme which is assigned to the incident issue type in the project's issue type screen scheme.
You are probably able to add approvers once the issue is created either because the field exists on the screen assigned to the edit context of the screen scheme, or because you are setting it on a screen during a workflow transition.
If you have site administration permissions (or maybe just project administration permissions depending on how the site is configured), and it makes sense in the context of your use case, you could add the approvers field to the create screen.
To update the field after the issue has already been created, without making any config changes, is dependent on how you are currently able to set the field. You will either be able to make an API request to directly update the field, or you will need to transition the issue through whatever transition currently allows you to set the field, again via API.

jira bulk update custom field value

I need to update all the values of a custom field in Jira. I noticed the "Bulk Fix Resolutions" script which is kind of what I want, but not for resolutions, for custom field value. Any thoughts on what I need to do?
A groovy script run in the ScriptRunner console. Carefully tested in staging beforehand. Or an external script such as jira-python
Thanks I found the answer here, it can be done with existing UI:
Using the bulk change wizard - The bulk change wizard will progress you through your bulk change. To step back at any step of the operation, select the relevant step in the menu on the left-hand side. Selecting Cancel will cancel the entire process.
https://confluence.atlassian.com/jiracoreserver074/editing-multiple-issues-at-the-same-time-921047221.html?_ga=2.18023408.858755321.1517851422-336306238.1516208522

In JIRA, how to prevent logging work once an issue has resolution Done?

I want to prevent my users from logging work once an issue gets to a particular status. How can I accomplish this?
I have a post-function in my workflow that sets the Resolution, but the "Log Work" item in the More menu still shows up.
I don't see in the Project or System administration any options about it.
You can accomplish this by setting jira.issue.editable to false in the properties of the status in the workflow.
Find the active workflow that applies to the issues you wish change. This is most easily done by either: going to the 'Workflow Schemes' admin page, then clicking on the Workflow link in the row applying to the issues' project and issue type, or clicking View Workflow in the Issue View.
To edit the workflow, you will need to either create a copy of it (if using the default jira system workflow) or edit the draft of the workflow.
In the Workflow Editor, for the 'Closed' step, click View Properties (in Text mode) or Properties (in Diagram mode) to see the step properties.
Editing issues in the selected step is enabled by default, or you will see a jira.issue.editable property with value true. Either create the value or chang the property value to false.
Publish your draft workflow, or if editing a copy, activate the workflow by creating a new workflow scheme associated with the edited workflow, and then associating it with your project.
Reference: https://confluence.atlassian.com/jira/allow-editing-of-closed-issues-138704.html

"System Test" for remote plugin?

I've been trying to follow http://devs.valence.desire2learn.com/2013/02/15/remote-plugins-the-bookwidget-sample-2 to make sure we can get the demo running before continuing with development, however we've run into the problem where the sample instructions given don't mention a "System Test Link", and d2l won't allow us to create the widget without one.
What is this, and how can this be solved?
Edit: The system the client is using is 10.1
Looks like the "community" decided that my additions to Sarah-Beth's answer were not appropriate. So here's my edited answer in it's entirety:
The System Test Link is not a required value in order to create a new Remote Plugin. This behavior has been verified against both Desire2Learn 10.1 and 10.2 environments.
A System Test Link value is required in order to run automated tests using the Test button on the Create a New Remote Plugin form. If you click the Test button without populating that field, you will be alerted that a value must be entered in the System Test Field in order to proceed. But this alert does not prevent you from creating your Remote Plugin by clicking Save.
The only required values for a new Remote Plugin are a launch point, a name, and a build type (course builder, widget).
Note. The UI for this management tool can be a bit confusing. When you enter your information and click Save, the tool's UX prompts the browser window to reset to the top of the displayed page: if your browser window is not long enough to contain the entire form, you will not see the little message above the Save button that tells you your configuration has changed, and there's no apparent change in the form's state. Accordingly, you may think that you haven't saved anything when, in fact you have.
Provide the config for your plugin, ensure you have a launch point, a name, and a build configuration selected (at least), and click Save. Once the browser resets the viewport to the top of the form's page, you should be able to click Cancel to back out of the form and see your new plugin in the list of plugins.
We are aware of the discomfort in this form and are taking steps to improve it's UX.
The System Test Link is not a required value in order to create a new Remote Plugin. This behavior has been verified against a Desire2Learn 10.2 environment.
A System Test Link value is required in order to run automated tests using the Test button on the Create a New Remote Plugin form. If you click the Test button without populating that field, you will be alerted that a value must be entered in the System Test Field in order to proceed. But this alert does not prevent you from creating your Remote Plugin by clicking Save.

Rename a job in jenkins

How to go about renaming a job in jenkins?
Is there another way than to create a new job and destroying the old one?
In Jenkins v2, in your dashboard or job overview, click right button on the job and select rename:
In the version we're running (1.480) it is simply a matter of changing the Project name in the Configure menu and hitting Save afterwards.
Cheers,
In New Jenkins, Click Rename link present in the left navigation pane, Update the job name and click save.
Simply change the name in the Pipeline/Project name and hit save.
Note that if your browser window isn't wide enough the "popup" below will be offscreen so make sure you scroll down or your jobs may mysteriously not rename.
"Are you sure about renaming old-job to new-job?"
Use the "Configure" option to the left:
Example showing Configure option
(Sorry, first few posts so I'm not able to post images in directly yet!)
If you can't see this then make sure you have access rights - in other words, you may need to be logged in, and you will need privileges that allow you to administer that job/pipeline.

Resources