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

how to get the issue id or key in the context of creating a new ticket

Manuel Joao March 12, 2015

Hello, i need to know how to get the issue id or key in java. Im developing a JIRA plugin that will validate fields in a new ticket screen, but i cannot retrieve the issue i am trying to retrieve custom field values in the edit screen.

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 12, 2015

You can't.  An issue will not get a key until the actual create process, which happens well after the screen.

Validators already have all the fields available during create though, so I'm not sure why you're looking for the ID.

Manuel Joao March 13, 2015

ok so i was looking at overriding the validateFromParams method, do you think i can use that to validate custom fields on the current screen

Manuel Joao March 13, 2015

I think i need to retrieve the values using Velocity template renderer.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2015

The structure of a validator handles all of that for you. Start with: public void validate(Map transientVars, Map args, PropertySet ps) throws InvalidInputException, WorkflowException { Issue issue = (Issue) transientVars.get("issue");

Manuel Joao March 13, 2015

Thanks Nic, ive got my validator plugin built now seems ok, but i will still need to retrieve a value from a custom field and compare it against another custom field value is this possible?

TAGS
AUG Leaders

Atlassian Community Events