Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Use JS code in the jira server Edited

Hi, I'm using jira software in my localhost, and I want to add JS code in my jira. So I used a plugin jsincluder, but there are a few modules here. I need to use require('p4api') module in js, so let me show you my code when I use it in my local file.


const P4 = require("p4api").P4
const p4 = new P4({
P4PORT: "myHost:1666",
P4USER: "username",
P4PASSWD: "password",

.then(out =>{
}).catch((err) => {
throw (err);

 here that code. This works perfectly, So is there a solution to use this code in jira?

Sorry for bad English. :)

1 answer

0 votes
Dario B Atlassian Team Jun 24, 2020

Hello @Mamikon Papikyan ,

I believe this thread has mistakenly been opened against the Jira Cloud collection while, from what I can read, it is about the jsincluder app for Jira Server. Can you confirm?

Also, from what I can see it looks like the app has been discontinued since in the marketplace listing for jsinclude:


However, even if I don't think I am the best person to answer this question, I believe all you have to do is to:

  1. Build p4api.js library as explained in:
  2. Include p4api.js (specify full path) at the top of your script in jsincluder, as shown in:


Also, please notice that if you are trying to integrate Jira with Perforce this might not be the best way to proceed and you might want to check the developers documentation explaining how to integrate with Jira Server instead:


Finally, for the future, in case help will be needed on development related issues please contact the resources you find in




Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Marketplace Apps & Integrations

🤺 Atlympic Event: Partnerships

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

56 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you