Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jira not getting custom fields on issue creation #5201

Open
davide136 opened this issue May 20, 2024 · 13 comments
Open

Jira not getting custom fields on issue creation #5201

davide136 opened this issue May 20, 2024 · 13 comments
Assignees
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@davide136
Copy link

fields := &jira.IssueFields{

Hi, it seems like the integration with Jira is not working, I tried a lot of times to make it work, changed field type on jira multiple times but it seems like the api implementation has the customfields mapped on the wrong level of the dto.

See here:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post

@ehsandeep ehsandeep added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label May 20, 2024
@davide136
Copy link
Author

davide136 commented May 20, 2024

maybe it's me not getting how a marshal map works, never used it...if it's something like [ ...items ] in js then probably it's fine, anyway with this config I'm not getting any values mapped in the tickets:

  custom_fields:
    security:
      name: $Severity  
    customfield_11031:
      freeform: $CVEID    
    customfield_11032:
      freeform: $CVSSScore
    customfield_11033:
      freeform: $CVSSMetrics

@dogancanbakir
Copy link
Member

image
# Jira contains configuration options for Jira issue tracker
jira:
#  # cloud is the boolean which tells if Jira instance is running in the cloud or on-prem version is used
 cloud: true
#  # update-existing is the boolean which tells if the existing, opened issue should be updated or new one should be created
#  update-existing: false
#  # URL is the jira application url
 url: https://your-instance.atlassian.net
#  # account-id is the account-id of the Jira user or username in case of on-prem Jira
 account-id: account-id-here
#  # email is the email of the user for Jira instance
 email: email-here
#  # token is the token for Jira instance or password in case of on-prem Jira
 token: token-here
#  # project-name is the name of the project.
 project-name: project-name-here
#  # issue-type is the name of the created issue type (case sensitive)
 issue-type: Task
#  # SeverityAsLabel (optional) sends the severity as the label of the created issue
#  # User custom fields for Jira Cloud instead
#  severity-as-label: true
#  # allow-list sets a tracker level filter to only create issues for templates with
#  # these severity labels or tags (does not affect exporters. set those globally)
#  allow-list:
  #  severity: info, medium, high, critical
#    tags: network
#  # deny-list sets a tracker level filter to never create issues for templates with
#  # these severity labels or tags (does not affect exporters. set those globally)
#  deny-list:
#    severity: low
#  # Whatever your final status is that you want to use as a closed ticket - Closed, Done, Remediated, etc
#  # When checking for duplicates, the JQL query will filter out status's that match this.
#  # If it finds a match _and_ the ticket does have this status, a new one will be created.
# status-not: Closed
#  # Customfield supports name, id and freeform. name and id are to be used when the custom field is a dropdown.
#  # freeform can be used if the custom field is just a text entry
#  # Variables can be used to pull various pieces of data from the finding itself. 
#  # Supported variables: $CVSSMetrics, $CVEID, $CWEID, $Host, $Severity, $CVSSScore, $Name
 custom-fields:
  customfield_10036: 
   freeform: "Nuclei"
  customfield_10037:
   freeform: $CVSSMetrics
  customfield_10038:
   freeform: $Severity

It took me a while to set up and test it, but I couldn't reproduce the issue.

@davide136
Copy link
Author

davide136 commented May 21, 2024

is it possible for you to check if in https://your-instance.atlassian.net/rest/api/latest/field you custom fields are like mine? Or post them here as an example?

Thank you.

  {
    "id": "customfield_11031",
    "key": "customfield_11031",
    "name": "CVSS",
    "untranslatedName": "CVSS",
    "custom": true,
    "orderable": true,
    "navigable": true,
    "searchable": true,
    "clauseNames": [
      "cf[11031]",
      "CVSS",
      "CVSS[Paragraph]"
    ],
    "schema": {
      "type": "string",
      "custom": "com.atlassian.jira.plugin.system.customfieldtypes:textarea",
      "customId": 11031
    }
  },
  {
    "id": "customfield_11032",
    "key": "customfield_11032",
    "name": "CVSS Score",
    "untranslatedName": "CVSS Score",
    "custom": true,
    "orderable": true,
    "navigable": true,
    "searchable": true,
    "clauseNames": [
      "cf[11032]",
      "CVSS Score",
      "CVSS Score[Paragraph]"
    ],
    "schema": {
      "type": "string",
      "custom": "com.atlassian.jira.plugin.system.customfieldtypes:textarea",
      "customId": 11032
    }
  },
  {
    "id": "customfield_11033",
    "key": "customfield_11033",
    "name": "CVSS Metrics",
    "untranslatedName": "CVSS Metrics",
    "custom": true,
    "orderable": true,
    "navigable": true,
    "searchable": true,
    "clauseNames": [
      "cf[11033]",
      "CVSS Metrics",
      "CVSS Metrics[Paragraph]"
    ],
    "schema": {
      "type": "string",
      "custom": "com.atlassian.jira.plugin.system.customfieldtypes:textarea",
      "customId": 11033
    }
  },
  {
    "id": "security",
    "key": "security",
    "name": "Security Level",
    "custom": false,
    "orderable": true,
    "navigable": true,
    "searchable": true,
    "clauseNames": [
      "level"
    ],
    "schema": {
      "type": "securitylevel",
      "system": "security"
    }
  },

@dogancanbakir
Copy link
Member

dogancanbakir commented May 21, 2024

This is the complete response from https://my-test-instance.atlassian.net/rest/api/2/field

fields [ { "id": "statuscategorychangedate", "key": "statuscategorychangedate", "name": "Status Category Changed", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "statusCategoryChangedDate" ], "schema": { "type": "datetime", "system": "statuscategorychangedate" } }, { "id": "issuetype", "key": "issuetype", "name": "Issue Type", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "issuetype", "type" ], "schema": { "type": "issuetype", "system": "issuetype" } }, { "id": "parent", "key": "parent", "name": "Parent", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "parent" ] }, { "id": "timespent", "key": "timespent", "name": "Time Spent", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "timespent" ], "schema": { "type": "number", "system": "timespent" } }, { "id": "customfield_10030", "key": "customfield_10030", "name": "Design", "untranslatedName": "Design", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10030]", "Design" ], "schema": { "type": "array", "items": "design.field.name", "custom": "com.atlassian.jira.plugins.jira-development-integration-plugin:designcf", "customId": 10030 } }, { "id": "customfield_10031", "key": "customfield_10031", "name": "Vulnerability", "untranslatedName": "Vulnerability", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10031]", "Vulnerability" ], "schema": { "type": "any", "custom": "com.atlassian.jira.plugins.jira-development-integration-plugin:vulnerabilitycf", "customId": 10031 } }, { "id": "project", "key": "project", "name": "Project", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "project" ], "schema": { "type": "project", "system": "project" } }, { "id": "customfield_10032", "key": "customfield_10032", "name": "Story Points", "untranslatedName": "Story Points", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10032]", "Story Points", "Story Points[Number]" ], "schema": { "type": "number", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:float", "customId": 10032 } }, { "id": "fixVersions", "key": "fixVersions", "name": "Fix versions", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "fixVersion" ], "schema": { "type": "array", "items": "version", "system": "fixVersions" } }, { "id": "aggregatetimespent", "key": "aggregatetimespent", "name": "Σ Time Spent", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [], "schema": { "type": "number", "system": "aggregatetimespent" } }, { "id": "statusCategory", "key": "statusCategory", "name": "Status Category", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "statusCategory" ] }, { "id": "resolution", "key": "resolution", "name": "Resolution", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "resolution" ], "schema": { "type": "resolution", "system": "resolution" } }, { "id": "customfield_10036", "key": "customfield_10036", "name": "Scanner", "untranslatedName": "Scanner", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10036]", "Scanner", "Scanner[Paragraph]" ], "schema": { "type": "string", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:textarea", "customId": 10036 } }, { "id": "customfield_10037", "key": "customfield_10037", "name": "Metrics", "untranslatedName": "Metrics", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10037]", "Metrics", "Metrics[Paragraph]" ], "schema": { "type": "string", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:textarea", "customId": 10037 } }, { "id": "customfield_10027", "key": "customfield_10027", "name": "Open forms", "untranslatedName": "Open forms", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10027]", "Open forms" ], "schema": { "type": "number", "custom": "com.atlassian.jira.plugins.proforma-managed-fields:forms-open-field-cftype", "customId": 10027 } }, { "id": "customfield_10028", "key": "customfield_10028", "name": "Submitted forms", "untranslatedName": "Submitted forms", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10028]", "Submitted forms" ], "schema": { "type": "number", "custom": "com.atlassian.jira.plugins.proforma-managed-fields:forms-submitted-field-cftype", "customId": 10028 } }, { "id": "customfield_10029", "key": "customfield_10029", "name": "Total forms", "untranslatedName": "Total forms", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10029]", "Total forms" ], "schema": { "type": "number", "custom": "com.atlassian.jira.plugins.proforma-managed-fields:forms-total-field-cftype", "customId": 10029 } }, { "id": "resolutiondate", "key": "resolutiondate", "name": "Resolved", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "resolutiondate", "resolved" ], "schema": { "type": "datetime", "system": "resolutiondate" } }, { "id": "workratio", "key": "workratio", "name": "Work Ratio", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "workratio" ], "schema": { "type": "number", "system": "workratio" } }, { "id": "issuerestriction", "key": "issuerestriction", "name": "Restrict to", "custom": false, "orderable": true, "navigable": false, "searchable": true, "clauseNames": [], "schema": { "type": "issuerestriction", "system": "issuerestriction" } }, { "id": "lastViewed", "key": "lastViewed", "name": "Last Viewed", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "lastViewed" ], "schema": { "type": "datetime", "system": "lastViewed" } }, { "id": "watches", "key": "watches", "name": "Watchers", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "watchers" ], "schema": { "type": "watches", "system": "watches" } }, { "id": "thumbnail", "key": "thumbnail", "name": "Images", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [] }, { "id": "created", "key": "created", "name": "Created", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "created", "createdDate" ], "schema": { "type": "datetime", "system": "created" } }, { "id": "customfield_10020", "key": "customfield_10020", "name": "Sprint", "untranslatedName": "Sprint", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10020]", "Sprint" ], "schema": { "type": "array", "items": "json", "custom": "com.pyxis.greenhopper.jira:gh-sprint", "customId": 10020 } }, { "id": "customfield_10021", "key": "customfield_10021", "name": "Flagged", "untranslatedName": "Flagged", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10021]", "Flagged", "Flagged[Checkboxes]" ], "schema": { "type": "array", "items": "option", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes", "customId": 10021 } }, { "id": "customfield_10022", "key": "customfield_10022", "name": "Target start", "untranslatedName": "Target start", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10022]", "Target start" ], "schema": { "type": "date", "custom": "com.atlassian.jpo:jpo-custom-field-baseline-start", "customId": 10022 } }, { "id": "customfield_10023", "key": "customfield_10023", "name": "Target end", "untranslatedName": "Target end", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10023]", "Target end" ], "schema": { "type": "date", "custom": "com.atlassian.jpo:jpo-custom-field-baseline-end", "customId": 10023 } }, { "id": "priority", "key": "priority", "name": "Priority", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "priority" ], "schema": { "type": "priority", "system": "priority" } }, { "id": "customfield_10024", "key": "customfield_10024", "name": "[CHART] Date of First Response", "untranslatedName": "[CHART] Date of First Response", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "[CHART] Date of First Response", "[CHART] Date of First Response[Date of first response]", "cf[10024]" ], "schema": { "type": "datetime", "custom": "com.atlassian.jira.ext.charting:firstresponsedate", "customId": 10024 } }, { "id": "customfield_10025", "key": "customfield_10025", "name": "[CHART] Time in Status", "untranslatedName": "[CHART] Time in Status", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "[CHART] Time in Status", "[CHART] Time in Status[Time in Status]", "cf[10025]" ], "schema": { "type": "any", "custom": "com.atlassian.jira.ext.charting:timeinstatus", "customId": 10025 } }, { "id": "customfield_10026", "key": "customfield_10026", "name": "Locked forms", "untranslatedName": "Locked forms", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10026]", "Locked forms" ], "schema": { "type": "number", "custom": "com.atlassian.jira.plugins.proforma-managed-fields:forms-locked-field-cftype", "customId": 10026 } }, { "id": "labels", "key": "labels", "name": "Labels", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "labels" ], "schema": { "type": "array", "items": "string", "system": "labels" } }, { "id": "customfield_10016", "key": "customfield_10016", "name": "Story point estimate", "untranslatedName": "Story point estimate", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10016]", "Story point estimate" ], "schema": { "type": "number", "custom": "com.pyxis.greenhopper.jira:jsw-story-points", "customId": 10016 } }, { "id": "customfield_10017", "key": "customfield_10017", "name": "Issue color", "untranslatedName": "Issue color", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10017]", "Issue color" ], "schema": { "type": "string", "custom": "com.pyxis.greenhopper.jira:jsw-issue-color", "customId": 10017 } }, { "id": "customfield_10018", "key": "customfield_10018", "name": "Parent Link", "untranslatedName": "Parent Link", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10018]", "Parent Link" ], "schema": { "type": "any", "custom": "com.atlassian.jpo:jpo-custom-field-parent", "customId": 10018 } }, { "id": "customfield_10019", "key": "customfield_10019", "name": "Rank", "untranslatedName": "Rank", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10019]", "Rank" ], "schema": { "type": "any", "custom": "com.pyxis.greenhopper.jira:gh-lexo-rank", "customId": 10019 } }, { "id": "timeestimate", "key": "timeestimate", "name": "Remaining Estimate", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "remainingEstimate", "timeestimate" ], "schema": { "type": "number", "system": "timeestimate" } }, { "id": "aggregatetimeoriginalestimate", "key": "aggregatetimeoriginalestimate", "name": "Σ Original Estimate", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [], "schema": { "type": "number", "system": "aggregatetimeoriginalestimate" } }, { "id": "versions", "key": "versions", "name": "Affects versions", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "affectedVersion" ], "schema": { "type": "array", "items": "version", "system": "versions" } }, { "id": "issuelinks", "key": "issuelinks", "name": "Linked Issues", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "issueLink" ], "schema": { "type": "array", "items": "issuelinks", "system": "issuelinks" } }, { "id": "assignee", "key": "assignee", "name": "Assignee", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "assignee" ], "schema": { "type": "user", "system": "assignee" } }, { "id": "updated", "key": "updated", "name": "Updated", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "updated", "updatedDate" ], "schema": { "type": "datetime", "system": "updated" } }, { "id": "status", "key": "status", "name": "Status", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "status" ], "schema": { "type": "status", "system": "status" } }, { "id": "components", "key": "components", "name": "Components", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "component" ], "schema": { "type": "array", "items": "component", "system": "components" } }, { "id": "issuekey", "key": "issuekey", "name": "Key", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "id", "issue", "issuekey", "key" ] }, { "id": "timeoriginalestimate", "key": "timeoriginalestimate", "name": "Original estimate", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "originalEstimate", "timeoriginalestimate" ], "schema": { "type": "number", "system": "timeoriginalestimate" } }, { "id": "description", "key": "description", "name": "Description", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "description" ], "schema": { "type": "string", "system": "description" } }, { "id": "customfield_10010", "key": "customfield_10010", "name": "Request Type", "untranslatedName": "Request Type", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10010]", "Request Type" ], "schema": { "type": "sd-customerrequesttype", "custom": "com.atlassian.servicedesk:vp-origin", "customId": 10010 } }, { "id": "customfield_10011", "key": "customfield_10011", "name": "Epic Name", "untranslatedName": "Epic Name", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10011]", "Epic Name" ], "schema": { "type": "string", "custom": "com.pyxis.greenhopper.jira:gh-epic-label", "customId": 10011 } }, { "id": "customfield_10012", "key": "customfield_10012", "name": "Epic Status", "untranslatedName": "Epic Status", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10012]", "Epic Status" ], "schema": { "type": "option", "custom": "com.pyxis.greenhopper.jira:gh-epic-status", "customId": 10012 } }, { "id": "customfield_10013", "key": "customfield_10013", "name": "Epic Color", "untranslatedName": "Epic Color", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10013]", "Epic Color" ], "schema": { "type": "string", "custom": "com.pyxis.greenhopper.jira:gh-epic-color", "customId": 10013 } }, { "id": "customfield_10014", "key": "customfield_10014", "name": "Epic Link", "untranslatedName": "Epic Link", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10014]", "Epic Link" ], "schema": { "type": "any", "custom": "com.pyxis.greenhopper.jira:gh-epic-link", "customId": 10014 } }, { "id": "timetracking", "key": "timetracking", "name": "Time tracking", "custom": false, "orderable": true, "navigable": false, "searchable": true, "clauseNames": [], "schema": { "type": "timetracking", "system": "timetracking" } }, { "id": "customfield_10015", "key": "customfield_10015", "name": "Start date", "untranslatedName": "Start date", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10015]", "Start date", "Start date[Date]" ], "schema": { "type": "date", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:datepicker", "customId": 10015 } }, { "id": "customfield_10005", "key": "customfield_10005", "name": "Change type", "untranslatedName": "Change type", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10005]", "Change type", "Change type[Dropdown]" ], "schema": { "type": "option", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:select", "customId": 10005 } }, { "id": "customfield_10006", "key": "customfield_10006", "name": "Change risk", "untranslatedName": "Change risk", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10006]", "Change risk", "Change risk[Dropdown]" ], "schema": { "type": "option", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:select", "customId": 10006 } }, { "id": "customfield_10007", "key": "customfield_10007", "name": "Change reason", "untranslatedName": "Change reason", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10007]", "Change reason", "Change reason[Dropdown]" ], "schema": { "type": "option", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:select", "customId": 10007 } }, { "id": "security", "key": "security", "name": "Security Level", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "level" ], "schema": { "type": "securitylevel", "system": "security" } }, { "id": "customfield_10008", "key": "customfield_10008", "name": "Actual start", "untranslatedName": "Actual start", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "Actual start", "Actual start[Time stamp]", "cf[10008]" ], "schema": { "type": "datetime", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:datetime", "customId": 10008 } }, { "id": "attachment", "key": "attachment", "name": "Attachment", "custom": false, "orderable": true, "navigable": false, "searchable": true, "clauseNames": [ "attachments" ], "schema": { "type": "array", "items": "attachment", "system": "attachment" } }, { "id": "customfield_10009", "key": "customfield_10009", "name": "Actual end", "untranslatedName": "Actual end", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "Actual end", "Actual end[Time stamp]", "cf[10009]" ], "schema": { "type": "datetime", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:datetime", "customId": 10009 } }, { "id": "aggregatetimeestimate", "key": "aggregatetimeestimate", "name": "Σ Remaining Estimate", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [], "schema": { "type": "number", "system": "aggregatetimeestimate" } }, { "id": "summary", "key": "summary", "name": "Summary", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "summary" ], "schema": { "type": "string", "system": "summary" } }, { "id": "creator", "key": "creator", "name": "Creator", "custom": false, "orderable": false, "navigable": true, "searchable": true, "clauseNames": [ "creator" ], "schema": { "type": "user", "system": "creator" } }, { "id": "subtasks", "key": "subtasks", "name": "Sub-tasks", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "subtasks" ], "schema": { "type": "array", "items": "issuelinks", "system": "subtasks" } }, { "id": "reporter", "key": "reporter", "name": "Reporter", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "reporter" ], "schema": { "type": "user", "system": "reporter" } }, { "id": "customfield_10000", "key": "customfield_10000", "name": "Development", "untranslatedName": "development", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10000]", "development" ], "schema": { "type": "any", "custom": "com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf", "customId": 10000 } }, { "id": "aggregateprogress", "key": "aggregateprogress", "name": "Σ Progress", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [], "schema": { "type": "progress", "system": "aggregateprogress" } }, { "id": "customfield_10001", "key": "customfield_10001", "name": "Team", "untranslatedName": "Team", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10001]", "Team", "Team[Team]" ], "schema": { "type": "team", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:atlassian-team", "customId": 10001, "configuration": { "com.atlassian.jira.plugin.system.customfieldtypes:atlassian-team": true } } }, { "id": "customfield_10002", "key": "customfield_10002", "name": "Organizations", "untranslatedName": "Organizations", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10002]", "Organizations" ], "schema": { "type": "array", "items": "sd-customerorganization", "custom": "com.atlassian.servicedesk:sd-customer-organizations", "customId": 10002 } }, { "id": "customfield_10003", "key": "customfield_10003", "name": "Approvers", "untranslatedName": "Approvers", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "Approvers", "Approvers[User Picker (multiple users)]", "cf[10003]" ], "schema": { "type": "array", "items": "user", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker", "customId": 10003 } }, { "id": "customfield_10004", "key": "customfield_10004", "name": "Impact", "untranslatedName": "Impact", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10004]", "Impact", "Impact[Dropdown]" ], "schema": { "type": "option", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:select", "customId": 10004 } }, { "id": "customfield_10038", "key": "customfield_10038", "name": "Severity", "untranslatedName": "Severity", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[10038]", "Severity", "Severity[Paragraph]" ], "schema": { "type": "string", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:textarea", "customId": 10038 } }, { "id": "environment", "key": "environment", "name": "Environment", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "environment" ], "schema": { "type": "string", "system": "environment" } }, { "id": "duedate", "key": "duedate", "name": "Due date", "custom": false, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "due", "duedate" ], "schema": { "type": "date", "system": "duedate" } }, { "id": "progress", "key": "progress", "name": "Progress", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "progress" ], "schema": { "type": "progress", "system": "progress" } }, { "id": "comment", "key": "comment", "name": "Comment", "custom": false, "orderable": true, "navigable": false, "searchable": true, "clauseNames": [ "comment" ], "schema": { "type": "comments-page", "system": "comment" } }, { "id": "votes", "key": "votes", "name": "Votes", "custom": false, "orderable": false, "navigable": true, "searchable": false, "clauseNames": [ "votes" ], "schema": { "type": "votes", "system": "votes" } }, { "id": "worklog", "key": "worklog", "name": "Log Work", "custom": false, "orderable": true, "navigable": false, "searchable": true, "clauseNames": [], "schema": { "type": "array", "items": "worklog", "system": "worklog" } } ]

@dogancanbakir
Copy link
Member

@davide136 Did you find it helpful?

@davide136
Copy link
Author

cvss metrics have the same configuration between yours and mine, I should be having values here:
image
I'm trying to see if there's anything that's breaking when creating tickets but nothing shows up in logs or in console, even when running it in verbose mode.
The only other red flag I have is that when I run nuclei with update-existing: true I'm getting the following errors:
[INF] 30 jira tickets created successfully, 2 failed
but console log is too short too see where it failed, and output log is not verbose like the console one, and it's not containing any errors related to jira

@dogancanbakir
Copy link
Member

Can you post your config file?

@davide136
Copy link
Author

davide136 commented May 27, 2024

Jira config
#5201 (comment)

report.yaml

jira:
  cloud: true
  update-existing: true  
  url: https://....atlassian.net
  account-id: 611...2
  email: davide...t
  token: ...C8
  project-name: DEVSECOPS
  issue-type: Bug    
  severity-as-label: true
  status-not: Done
  allow-list:
      severity: high, critical
      tags: network
  custom_fields:
    security:
      name: $Severity  
    customfield_11031:
      freeform: $CVEID    
    customfield_11032:
      freeform: $CVSSScore
    customfield_11033:
      freeform: $CVSSMetrics

Pipeline step for bitbucket:

- step: &DAST_Nuclei
    name: Dynamic Application Security Testing with Nuclei
    image: golang:latest
    runs-on:
        - self.hosted
        - linux
        - intensive
        - docker
    script: 
        # Install Nuclei using Go
        - echo $NUCLEI_AUTHENTICATION_CFG | base64 -d > authentication.yaml 
        - echo $NUCLEI_REPORT_CFG | base64 -d > report.yaml 
        - go install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
        - PDCP_API_KEY="$NUCLEI_APIKEY" nuclei -u $APP_HOST_URL/$APP_ROUTE -rc report.yaml -o scan_output.txt -sni $APP_HOST_URL -cloud-upload -secret-file authentication.yaml -v | tee output_console.txt
        # Run the Nuclei scan
        #- nuclei -u https://giorgione.geo.works/permits -o scan_output.txt
    artifacts:
        - scan_output.txt
        - output_console.txt

@dogancanbakir
Copy link
Member

I don't see anything wrong with the configuration, but to be honest, I'm not sure why this isn't working for you.

@davide136
Copy link
Author

May i ask you which kind of project template you selected on project creation in Jira? Maybe there's something hidden that's blocking me

@dogancanbakir
Copy link
Member

I can't remember what option I chose during creation, but it says "software project" under project name.

image

@dogancanbakir
Copy link
Member

Was the information useful to you?

@davide136
Copy link
Author

davide136 commented Jun 12, 2024

nope, I have the same type on the project info. I tried more stuff but my solution was to use Jira automation to check the ticket labels on creation to set the ticket priority and I'm surrending on the CVSS + CVSS metrics column, I'll just read them from the tickets.

I'll let you decide if you want to close the issue on this comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

3 participants