JIRA Hide fields in View - jira

I have certain issues that are secure and should not be viewed by all roles. I'm looking for a way to only show the summary on the view screen but no other details unless a certain role views it. Some sort of way to flag an issue on creation to hide certain fields.

There may be other easy ways to do this.but one solution that comes to my mind is use of Behaviours plugin.using this plugin can hide fields if certain user logged into the system.
you can follow steps like this..
1.install Behaviours plugin and create new behaviour then add mappings and go to the fiels and do the relevant configurations...
2.then you can add fields you want to hide and add conditions to them. then there is a option to add certain user roles in the condition configuration page.
3.then click on the hide link on the Field page.
Note-the Behaviours plugin is part of the Script Runner plugin now.you can use either Behaviours plugin s or Script Runner plugin

Related

Customization of columns in jenkins form for specific JOB

Is there any way in Jenkins where I can view customized data for a specific project. Like in the screenshot we can see columns (Salves, Online slaves, offline slaves etc.) Screen shot Example
View> Edit View> Portlets in the right column > Slaves statistics
I want to customize these columns for my project requirements like Build numbers, Revision numbers, svn changes (for every individual revision), the user (who submit this build) and Status. I knew we can see these changes individually from localhost:8080/jenkins/job/Job_name/224/ but I want to see whole information in one single form. I am good in Powershell but Java is not my cup of tea. Please help.
I don't think there is a plugin available to add custom columns, will require creating a custom plugin yourself. A plugin to add some pre-defined extra columns is available https://wiki.jenkins.io/display/JENKINS/Extra+Columns+Plugin
Alternatively, we added custom key value pairs in every build using currentBuild.description as shown here to be able to view in a single screen artifact name and environment for each build

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

Auto assign to team lead/developer on bug reopen

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.

Is it possible to show all the submits from a Perforce depot without having to select a job?

We are currently attempting to setup an instance of Jenkins as our build system for our code base. We have multiple jobs setup (all using the same depot) to build different sections of the code.
We would now like to show the submits from all users pertaining to this depot on the main Jenkins screen rather than being able to view the change lists involved with a certain build (e.g. by selecting a certain job and then the link leading to the build information, etc...). I've looked into possible plugins and the closest one I was able to find was the "All Changes Plugin". This is exactly what we would like, but this is only visible when viewing the details of a build (e.g. which CLs were used to create the build), but would it be possible to show this type of information on the main Jenkins page instead?
Thank you in advance for your help.
You could write an extension for the Dashboard View plugin to provide a portlet containing an aggregated list of changes from perforce, though if you aren't experienced with writing plugins then you might be better off using a separate repository browser such as Fisheye or P4Web to display your changes.

Implementing workflow in bestpractical.com RT

I would like to implement simple workflow system inside the Bestpractical RT.
My approach is:
Participant (RT user) creates or is given Workitem (Ticket) inside the Business Process (Queue)
OnResolve scrip checks change Ticket status to Open and change TicketOwner to next Participant.
OnReject scrip changes Ticket status to Open and gives it back to previous Participant.
My questions are:
- Is there good scrip examples to manipulate statuses?
- How can I debug scrips?
- How to disable built-in scrips for queues?
I read that it is possible to create a module for RT with actions which can then be called from scrips, but cannot find good documentation/examples. Please advise if you have one.
And the last question, how to enable developer mode in RT?
Thank you very much in advance,
Alexei
I'll assume you're running an RT version 4.0.x.
For the workflow you described, you probably want to create new tickets for each phase rather than having tickets set to resolved, then re-opening them. You can create new tickets in scrips to do this. You can also create link relationships between them like Depends On or Parent Child.
You can find user-contributed samples of various conditions on the RT wiki. You'll see a bunch of debug output for scrips if you turn on debug mode in your logging config. You can also put warn statements in code to see additional output in the RT logs. To disable scrips, edit the scrip and set the Stage to disabled. These built-in scrips are global, so if you want to set them per-queue, you can create scrips under the queue configuration to make them queue-specific.
The best examples of actions and conditions are the RT code itself. You can find documentation at the bottom of the main documentation page. From there, you can look in the lib directory in the RT code to see how the actions and conditions are implemented. It's generally easier to get started creating actions and conditions by selecting User defined and using the text boxes on the scrip edit page.
You can set devel mode in the configuration file. Make use you set these in RT_SiteConfig.pm, not Config.pm. You'll also want to set you log levels to debug.

Resources