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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

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

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
Community showcase
Published in Advanced Roadmaps

Introducing Advanced Roadmap’s new dependency report

To see this feature in action check out our recent dependencies demo here: https://www.youtube.com/watch?v=eQu5VsUqyZA Keeping on top of your dependencies is a key part of ensuring project success....

119 views 2 6
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