12.0.0 • Published 10 months ago

ngx-jira-issue-collector v12.0.0

Weekly downloads
21
License
MIT
Repository
github
Last release
10 months ago

ngx-jira-issue-collector

Commitizen friendly semantic-release

Commands

npm run {lint, test, build, commit, semantic-release}

Compatibility

AngularChannel
8.x.x8.x
9.x.x9.x
12.x.x10.x
14.x.x11.x
15.x.x12.x

Ivy is partially enabled with v11.x of this library(https://angular.io/guide/creating-libraries#publishing-libraries)

Ivy compilation is disabled till v10.x of this library as per docs

Till v10.x of this library, it is not recommended to publish Ivy libraries to NPM repositories. Before publishing a library to NPM, build it using the --prod flag which will use the older compiler and runtime known as View Engine instead of Ivy.

Jira
v8.2.3

Only tested with Jira Software

API

import { NgxJiraIssueCollectorModule } from 'ngx-jira-issue-collector';

@Inputs

InputTypeRequired
configurationCollectorOptions:heavy_check_mark:

Example

Jira trigger

config: CollectorOptions = {
  baseUrl: 'https://jira.myorg.com',
  collectorId: 'coll123'
};
<div>
  <ngx-jira-issue-collector [configuration]="config"></ngx-jira-issue-collector>
</div>

Custom trigger

config: CollectorOptions = {
  baseUrl: 'https://jira.myorg.com',
  collectorId: 'coll123'
};
<div>
  <button (click)="collector.showDialog()">Click me!</button>
  <ngx-jira-issue-collector [configuration]="config" #collector></ngx-jira-issue-collector>
</div>

Custom environment

Environment are the properties sent to Jira if CollectorOptions.recordWebInfo is true. The default information, if the user allows collection, is:

const environment = {
  Location: window.location.href,
  Referrer: document.referrer,
  'User-Agent': navigator.userAgent,
  'Screen Resolution': screen.width + ' x ' + screen.height
};

Using CollectorOptions.environment and CollectorOptions.environmentFn you can specify other defaults to collect information about the user's environment.

config: CollectorOptions = {
  baseUrl: 'https://jira.myorg.com',
  collectorId: 'coll123',
  environment: {
    'custom-env': 'test'
  },
  environmentFn: () => {
    return {
      'custom-env2': 'test'
    };
  }
};

Field values

Field values can be used to pre-populate fields in Jira, using CollectorOptions.fieldValues and CollectorOptions.fieldValuesFn.

config: CollectorOptions = {
  baseUrl: 'https://jira.myorg.com',
  collectorId: 'coll123',
  fieldValues: {
    summary: 'Title of ticket'
  },
  fieldValuesFn: () => {
    return {
      description: 'Textarea for in-depth description'
    };
  }
};

The keys should correspond to a field selected in the Issue collector configuration, for custom fields refer to the jira documentation.

12.0.0

10 months ago

11.0.0

1 year ago

10.0.3

2 years ago

10.0.2

2 years ago

10.0.1

3 years ago

10.0.0

3 years ago

9.0.4

3 years ago

9.0.3

3 years ago

9.0.2

4 years ago

8.0.1

4 years ago

9.0.1

4 years ago

9.0.0

4 years ago