REST API for associating Xray configuration/coverage with jira project programmatically - jira

I want to automate the manual process of associating a jira project with xray so that projects can leverage the features of xray.
I have explored various jira and xray api's available at https://confluence.xpand-it.com/display/public/XRAY/REST+API but could not find any API which can help in doing so.
Automating this with selenium or htmlunit is one option but it will be time consuming if there are more projects.
Is there any workaround/trick to automate this or if there's any undocumented api which can help in associating jira projects to xray plugin. Any suggestions please?

I have found a way to do this programmatically. No need of using ScriptRunner's custom REST API capabilities as documented here
Configure the headers as below,
Content-Type:application/x-www-form-urlencoded
X-Atlassian-Token:no-check
Access the below GET call with the required query parameters,
https://{YOUR_JIRA_HOME_URL}/XrayRequirementProjectsConfiguration.jspa?makeCompatible={PROJECT_KEY}
Specify the project key of the project for which you would like to enable the XRAY coverage.

Related

How to get all boards in jira project using either Rest API or jira-ruby gem

I am trying to use this How to get all sprints in project using JIRA REST API to build code which gets all sprints for jira project. I miss one piece however: how to get all boards in jira project?
Proposed solution is to
use https://myjira.com/rest/agile/1.0/board to get all boards
and for every board to query https://myjira.com/rest/agile/1.0/board/BOARD_ID/project to find out if it belongs to my project.
However my jira has ~10'000 boards. I can't make 10'000 JIRA queries for them. I need something like https://myjira.com/rest/agile/1.0/board?project=PROJECTNAME. If that's not possible, then I need at least to include project name into /board result.
Acc. to https://docs.atlassian.com/jira-software/REST/7.3.1/?#agile/1.0/board-getAllBoards you can use the projectKeyOrId parameter in your GET request to provide the project's key, e.g.
https://myjira.com/rest/agile/1.0/board?projectKeyOrId=PROJECTNAME

How to publish custom message on the TFS vNext build summary page?

Here is a typical build summary page:
I would like to add a custom message somewhere on this page, preferably under its own title.
How can it be done?
You can custmoise Azure DevOps with extensions.
What are extensions?
Extensions are simple add-ons that can be used to customize and extend your DevOps experience with Azure DevOps Services. They are written with standard technologies - HTML, JavaScript, CSS - and can be developed using your preferred dev tools. They utilize our RESTful API Library in order to easily interact with Azure DevOps Services and applications/services.
There is a big marketplace, and in your case, you can write your own extension, find a tutorials here.
You can find in Github an example how to extned the build summry page.

Can we export testcases/Reports from testlink to JIRA

We are planning to use one testcase management tool for our project.
I am using testlink in my previous project.
But my management want JIRA as all our sprint planning and bug tracking is happing over there.
Can I export Testlink testcases and reports in JIRA without using any add-ion
If no, Then what are other option I can use.
I have find Zephyr add-ion which can do similer like this. is it any other option present?
I have also found that JIRA can accept rest-api but then I need to make changes in testlink project so testlink can send JSON to JIRA
What should I follow. any suggestion will help
I worked with one QA team that created a custom 'testcase' issue type in JIRA. They removed all the standard JIRA fields that weren't required and added in custom fields for things that were not covered by standard JIRA fields (such as 'test category', 'pass/fail' checkbox, etc.).
The 'testcase' issues were used as sub-tasks for user stories. Using this approach each requirement had one or more test cases associated with it.
When they needed to report they would do an issue search for issues of type 'testcase' within a particular time period. Then they would export all fields to Excel.
In my company we're using Testlink and JIRA and has been proposed to remove Testlink migrating all the data to JIRA but depending of the usage of JIRA(amount of data it is managing) as this can overload JIRA due to you will need several custom fields, maybe customized with JavaScript and that can be worth.
We analysed the possibility to use the Zephyr plugin which is appropiated for this usage.

How to integrate Jira with GitLab CE?

We have self hosted GitLab CE and Jira, we want
link git commit with jira issue
link git commit with jira issue status, like we can start/move/close issue by git issues
limit above operations on specific branches, e.g., change issue status only when commits on master branch since we perform merge request for every single feature/bug
but only GitLab EE built-in supports Jira integration, how could I do that for GitLab CE?
I'm on GitLab CE 7.8.2, Jira+Agile 6.4
I think there is now a better way:
https://docs.gitlab.com/ce/user/project/integrations/jira.html
GitLab can be configured to interact with JIRA. Configuration happens via user name and password. Connecting to a JIRA server via CAS is not possible.
Each project can be configured to connect to a different JIRA instance, see the configuration section. If you have one JIRA instance you can pre-fill the settings page with a default template. To configure the template see the Services Templates document.
Once the project is connected to JIRA, you can reference and close the issues in JIRA directly from GitLab.
You can take a look at this project : https://github.com/akraxx/gitlab-jira-integration. It's a Java application, so you will need a server with a JVM to run it.
Follow the README to know how to configure it :)
Note that, with GitLab 13.3 (August 2020), you don't have to setup a third-party integration on each project anymore.
You can do so at your managed Gitlab instance level (free edition).
Instance-level project integration management for external services
Administrators of self-managed GitLab can now integrate third-party services with all projects on the instance from a single interface.
Previously, integrations had to be configured per project, which meant that if an instance had thousands of projects, thousands of individual configurations had to be manually configured. Not only was this time-consuming, but it was also error-prone, hard to update, and made it difficult to enforce integrations as a policy.
By configuring integrations across all projects, administrators save themselves and their project owners incredible amounts of time and effort.
This is the first iteration of this functionality. In upcoming releases, we will expand this feature to the group level, add more configuration and compliance options, and more.
See Documentation and Issue.
Plus, with GitLab 13.4 (September 2020)
GitLab for Jira and DVCS Connector now in Core
For users of Jira GitLab, the GitLab for Jira app and the DVCS Connector
allow you to display information about GitLab
commits and merge requests directly in Jira.
Combined with our native
integration with Jira, you can easily move back and forth between the
two applications as you work.
These features were previously available only in our Premium plan, but
are now available to all users!
See Documentation and Issue.
See GitLab 13.6 (November 2020)
Group-level management of project integrations
In GitLab 13.3, we added the ability to enable an integration across an entire instance.
With GitLab 13.6, that feature is being expanded to allow integrations to be managed at the group level as well!
Group owners can now add an integration to a group, and that integration will be inherited by all projects under that group.
This has the potential for saving massive amounts of time, as many organizations have specific integrations that they want rolled out to every project they create.
A great example of this is using our Jira integration. If you’re using Jira, it’s almost always across the whole company. Some of these companies have thousands of projects and therefore had to configure each and every one of those integrations individually.
With group-level management of project integrations, you can add the integration at each parent group, reducing the amount of configuration required by orders of magnitude!
Read more in our announcement on the GitLab blog.
See Documentation and Epic.
With GitLab 13.10 (March 2021):
View Jira issue details in GitLab
Users of our Jira issue list feature can now view the details of an issue directly inside of GitLab! This MVC enables developers to see the details, labels, and comments on an issue, giving them the ability to stay in GitLab while working on Jira issues.
Our goal is to empower developers to stay inside of GitLab during the majority of their day, and this is now one less trip to Jira you’ll have to make.
In GitLab 13.10, this feature is available if you enable a feature flag. This feature will be enabled by default in GitLab 13.11.
See Documentation and Epic.
At the moment I think the GitLab Listener add-on for JIRA is the only way to integrate GitLab CE and JIRA. You can use commit messages to generate JIRA worklogs, comments and activities, as well as execute workflow transitions. The add-on also tries to map GitLab users to JIRA users in order to link worklogs, comments, etc. to the right user.
It's a simple add-on and maybe it does not cover all your requirements, but it's better than nothing :).

JIRA: developing a custom plugin for JIRA

I am trying to come up with a custom plugin for JIRA. The custom plugin supports git notes feature in JIRA dashboard.
My question is, does commercial JIRA support a custom JIRA plugin?
And are any tutorials/best practices for developing custom JIRA plugin?
does commercial jira support custom jira plugin?
Yes. You can write your plugin and upload it in the "Manage Add-ons" section of your admin area.
are any tutorials/best practices for developing custom jira plugin?
Yes. Take a look at the JIRA Plugin Guide (the link is broken at the moment of this edit, this link appears to replace the broken one).
You may also investigate Atlassian Marketplace in order to search any specific plugin that develop by other companies.
Since various plugins had already been developed, those are being leaded to you during development of the plugin.

Resources