You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently my app utilizes the Jira Issue Collector Plugin for users to submit help requests to my SM project, which by default includes an option to include details about the users web environment (Location, Referrer, User-Agent, Screen Resolution). Due to the fact that the plugin hasn't been updated in years we're getting vulnerability warnings from the Rapid7 Scans, so I'm working on creating issues with the REST API. However, I'm having trouble figuring out how to include that Environment data when creating a new issue. I see the local $environment property in the IssueField class, but not seeing any set methods, and even though that field takes a paragraph element, the property is marked as array type in that class. Is this something that is possible with this library, or will I need to manually manipulate the JSON object before passing to the IssueService Create method?
The API Documentation Indicates that it accepts that variable in the formData (which I am passing from my custom form)
The only place I can see reference to the environment key is in the IssueField Class
Here is the method that I'm using to generate the Issue.
`$det = new AtlassianDocumentFormat(
(new Document())
->paragraph()
->text($formData['description'])
->end()
);
$issue = (new IssueField())
->setProjectKey('DTSM')
->setSummary($formData['summary'])
->setReporterName($formData['name'])
->addLabelAsString($_ENV['JIRA_ISSUE_LABEL'])
->setIssueTypeAsString($_ENV['JIRA_ISSUE_TYPE'])
->addCustomField('customfield_10101', $formData['email'])
->setDescription($det);
(new IssueService())->create($issue);`
Hi @jrobinsonadrenaline I hope you're doing well. sorry to late reply.
I believe that If you have decided to gather user web environment through REST API, adding custom fields is a suitable solution for you.
for instance, you can add custom fields for each field (Location, Referrer, User-Agent, Screen Resolution).
Currently my app utilizes the Jira Issue Collector Plugin for users to submit help requests to my SM project, which by default includes an option to include details about the users web environment (Location, Referrer, User-Agent, Screen Resolution). Due to the fact that the plugin hasn't been updated in years we're getting vulnerability warnings from the Rapid7 Scans, so I'm working on creating issues with the REST API. However, I'm having trouble figuring out how to include that Environment data when creating a new issue. I see the local $environment property in the IssueField class, but not seeing any set methods, and even though that field takes a paragraph element, the property is marked as array type in that class. Is this something that is possible with this library, or will I need to manually manipulate the JSON object before passing to the IssueService Create method?
Here is the method that I'm using to generate the Issue.
`$det = new AtlassianDocumentFormat(
(new Document())
->paragraph()
->text($formData['description'])
->end()
);
Library version: "lesstif/jira-cloud-restapi": v1.6.2
Any assistance is greatly appreciated!
The text was updated successfully, but these errors were encountered: