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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,097
Community Members
 
Community Events
184
Community Groups

Error creating or updating a portfolio

When i try to create a portfolio i get the following error

portfolio.PNG

 

reading the logs (atlassian-jira.log)

portfolio2.PNGportfolio3.PNG 

Why my id will be arriving null to base data?

1 answer

0 votes
JamieGeorgeson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 17, 2018

Hey @Miguel Balbi, thanks for providing the relevant logs.

I can't reproduce this when creating a Program on my local instance.

It looks like we're trying to write a null value to the ID column in the program table. This is interesting because the ID column should be managed automatically by an auto-incrementing sequence in Postgres, we don't generate the ID value in the Portfolio code itself.

I suspect maybe Portfolio hasn't installed properly and the database schema has been left in an invalid state? Is this something that only started happening recently, or is this a new install that isn't working correctly? I'd like to check the start-up logs to make sure Portfolio has installed properly.

We should be able to see Portfolio initialise in the Jira start-up logs, it should look something like this:

[INFO] [talledLocalContainer] 2018-08-17 16:41:31,465 localhost-startStop-1 INFO [c.a.jira.startup.JiraStartupLogger]
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] ___ Plugin System Started _________________
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] 2018-08-17 16:41:31,550 localhost-startStop-1 INFO [c.a.jira.upgrade.UpgradeScheduler] Scheduling upgrades to run in 1 minute(s)

...

[INFO] [talledLocalContainer] 2018-08-17 16:41:31,914 localhost-startStop-1 INFO [c.r.r.j.common.components.PortfolioAwesomeLauncher] =======================================
[INFO] [talledLocalContainer] 2018-08-17 16:41:31,914 localhost-startStop-1 INFO [c.r.r.j.common.components.PortfolioAwesomeLauncher] === Lauching Portfolio for Jira ... ===
[INFO] [talledLocalContainer] 2018-08-17 16:41:31,914 localhost-startStop-1 INFO [c.r.r.j.common.components.PortfolioAwesomeLauncher] =======================================

...

[INFO] [talledLocalContainer] 2018-08-17 16:41:32,335 localhost-startStop-1 INFO [c.a.r.c.b.jira.lifecycle.PluginStartUpTaskServiceBridge63] start up task 'Active Objects initialization' finished.
[INFO] [talledLocalContainer] 2018-08-17 16:41:32,335 localhost-startStop-1 INFO [c.a.r.c.plugin.lifecycle.PrimeDatabaseStartUpTask] Priming database

...

Are you able to find this section in your logs? Do you see any exceptions nearby?

On the database schema possibly being invalid, this is what that Program's table looks like for me locally:

jiradb=# \d+ "AO_D9132D_PROGRAM"
Table "public.AO_D9132D_PROGRAM"
Column | Type | Modifiers | Storage | Stats target | Description
-------------+------------------------+------------------------------------------------------------------+----------+--------------+-------------
DESCRIPTION | text | | extended | |
ID | bigint | not null default nextval('"AO_D9132D_PROGRAM_ID_seq"'::regclass) | plain | |
OWNER | character varying(255) | | extended | |
TITLE | character varying(255) | | extended | |
Indexes:
"AO_D9132D_PROGRAM_pkey" PRIMARY KEY, btree ("ID")
Referenced by:
TABLE ""AO_D9132D_PERMISSIONS"" CONSTRAINT "fk_ao_d9132d_permissions_program_id" FOREIGN KEY ("PROGRAM_ID") REFERENCES "AO_D9132D_PROGRAM"("ID")
TABLE ""AO_D9132D_PROGRAM_CUSTOM_FIELD"" CONSTRAINT "fk_ao_d9132d_program_custom_field_program_id" FOREIGN KEY ("PROGRAM_ID") REFERENCES "AO_D9132D_PROGRAM"("ID")

The key part is:

 ID          | bigint                 | not null default nextval('"AO_D9132D_PROGRAM_ID_seq"'::regclass)

Is it possible for you to connect to your own database and inspect the "AO_D9132D_PROGRAM" table to make sure your ID column has the same constraints?

Sorry I can't give you an answer for this right away, we need a bit more data to debug this properly.

Regards,

The Portfolio for Jira Team

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events