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

how to bring in a field from Jira

Sue Hannan
Contributor
November 20, 2024

I am trying to bring a value in from jira that is a single select field. I want to get the value from the jira ticket that I am linking.

3 answers

1 accepted

2 votes
Answer accepted
Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 21, 2024

Hi @Sue Hannan ,

It's my understanding when a JPD idea is linked to a Jira issue, you want to copy the Jira issue's single-select field into the JPD idea's single-select field. If there is more to this use case like if this is through deliveries or something else, please share whenever you have the chance.

One issue I could see happening is dependent on where the linking occurs - meaning if the Jira issue is linked within the JPD idea, or if the JPD idea is linked within the Jira issue. To account for this, I configured an IF/ELSE automation that can work for either. It might look something like the one below.

The first half of this automation (IF) accounts for when a Jira issue is linked within a JPD idea:

ssa1.jpg

1) WHEN: Issue Linked (All types in this example, but can be configured to your use case)

2) IF/ELSE: Conditions

  • Project = select JPD project

3) BRANCH rule / related issues

  • Type of related issues = Current issue (which is the JPD idea)

4) THEN: Edit issue field

  • Select JPD single-select field
  • Use smart value: {{destinationIssue.customfield_12345}}

 

The second half of this automation (ELSE) accounts for when a JPD idea is linked within a Jira issue:

ssa2.jpg

5) ELSE-if: Conditions

  • Project = select Jira project

6) BRANCH rule / related issues

  • Type of related issues = Linked issues (which is the Jira issue)

7) THEN: Edit issue field

  • Select JPD single-select field
  • Use smart value: {{triggerIssue.customfield_12345}}

 

A few things to note about the automation above:

  • IF the first half of this automation does not match, then it will review the ELSE second half. IF the first half of this automation matches, then it will not review the ELSE second half
  • customfield_12345 should be replaced with the ID of your Jira single-select field's ID. You can find this using this page: Find my custom field ID number in Jira
  • As mentioned above, depending on where the linking occurs would determine whether to use destinationIssue or triggerIssue in the smart value.
  • The Scope of this automation is set to Multiple projects with only the JPD and Jira projects select, but can be configured depending on your use case
  • An automation cannot create new options/values, so these need to exist within your JPD single-select field beforehand

 

Hope that helps and doesn't overcomplicate things, but again - just trying to account all variables, and where the linking occurs. Let us know if you have any questions.

Sue Hannan
Contributor
November 26, 2024

I like this idea, however, I cannot find my JPD field I set up when following the rule above

 

Sue Hannan
Contributor
November 26, 2024

also, my linked ticket is a 'delivery ticket' so I don't think an automation will work. please let me know if you have proved it can work for a linked 'delivery ticket' to an idea in JPD

0 votes
Sue Hannan
Contributor
November 26, 2024

@Bill Sheboy and @Nick Haller 

Thank you

Hi, I would like to pull in more than the status and date fields when linking a 'delivery ticket'. I am unable to find a way to pull in other fields from Jira. However since I studied the way the tool is working I see that it pulls in the child level info so it might be hard to pull in a single select field value as the tool won't really know which child to pull it from. More so what I am looking for is grabbing this type of info from the linked 'delivery ticket' parent. So if I link an initiative issue type, grab the single select field value from the jira ticket and display in on my idea in JPD. For now I am duplicating values in my idea that align to my linked 'delivery ticket' so I have visibility in my JPD view. 

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 26, 2024

Thank you for the additional information, Sue!

Assuming your rule is defined in the Software Project to update the Idea in the JPD one, you could:

  • use a JQL branch to access the Idea in the JPD project
  • then use Lookup Issues with JQL to access the correct "parent" issue needed from the delivery tickets linked to the Idea
  • finally, get the field from the lookup results to set the field in the Idea

These steps would be variations of / supplements to the solution proposed by Nick.

 

One challenge is I do not believe JPD enforces a 1-1 relationship between Idea usage of "delivery ticket" links.  And so if someone links the same Software Project issue to multiple Ideas, the rule would need to either update all the linked Ideas or evaluate which one to update (again using JQL in the branch).

 

Sue Hannan
Contributor
November 26, 2024

Hi, I'm sort of following so the automation would be in the Jira software to update the JPD? I'm having trouble seeing that as I don't believe the fields in JPD are able to be accessed since JPD is team managed project.

If the thought is to put this automation in JPD then it makes a little more sense to me. I will try your proposal/automation and I'm not worried about it impacting all ideas where the ticket is linked. 

I have a feeling though the automation doesn't recognize the custom JPD field. Should I be using a specific field in JPD. For example, I have a field in Jira software that is a work type fields with let's say Large, Big, Small and in JPD I created a custom field with same values and called it WType. I couldn't find it  in my list of fields when I was at the Edit issue point. 

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 26, 2024

To access issues in multiple projects, the rule scope (in the details at the top) is set to multiple-project or global.  Technically speaking, once a rule has a larger scope, it is managed from the global automation area.  Your Jira Site Admin can help with that change.

 

Many JPD fields can be set with an automation rule, sometimes using advanced edit with JSON and the custom field ID rather than the smart value for the field name.  Some fields cannot be set with automation (such as the calculated / formula ones). 

To check if a field can likely be updated by a rule, please use this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Sue Hannan
Contributor
November 27, 2024

Hi, it is me again. A few thoughts. I do not have the multiple project option so I can choose global. However, when I look to kick off the rule with when issue linked there is not an option for a delivery ticket link (this is what I am doing in JPD). Also, if it populates upon linking a delivery ticket to an idea on the initial linkage, then I would assume I need another automation in the Jira linked ticket for when that same fields changes to go then and update the JPD idea. For starters for automation in JPD, can you send what it would look like for when issue linked (and the link type being a delivery ticket). 

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 27, 2024

Hi @Sue Hannan ,

If you can describe the use case step-by-step, it will be helpful. I'm still unsure whether;

  1. the Jira issue is created outside of the JPD idea, then it's linked as a delivery, and fields should be mapped during the linking
  2. the JPD idea is creating the Jira delivery, then updates on the delivery fields need to map back to the idea
  3. or something else

The automation's configuration will be dependent on the actual use case and workflow, as each component will differ based on the step-by-step and how you want to map the fields.

Like Bill Sheboy likes this
Sue Hannan
Contributor
December 2, 2024

Hi @Bill Sheboy and @Nick Haller here are the details

We have a JPD with ideas that we are linking to initiative type Jira tickets.

  1. First we create the JPD idea, with same name as the Jira Initiative ticket just bc the purpose of our JPD is to create a dashboard resemblance of the Initiatives within certain teams to see progress
  2. Then we add a few columns to our view (some text, some single select fields all from what is available in JPD)
  3. Then we click the idea and select the delivery button and link an existing ticket under the Delivery section.
  4. The ticket we link is an initiative so once linked we add a few other columns (sometimes we do this in step 2)
  5. The col's we add are the Project start, Project target, Delivery Status, Delivery progress. The start and target are both connected to the Jira Start date and Due date.
  6. What I have observed is the tool will show the earliest start and latest end from the children of the initiative (one level down that is).
  7. Then of course for status it uses the children (one level down) unless there are no children and in that case it uses the root or initiative level.
  8. So what I want to do is grab other fields from the initiative level jira ticket such as a work type (single select field) so I set up same type of field in JPD and would like to map the value from the Jira initiative L1 ticket to the idea (same type of field with same values in JPD.
  9. (this here is really a nice to have) One other thought, as I put in a rule for the start and end to highlight if within 10 days of start or beyond the current date for the end. It would be great to improve this rule and look to see if status is done in case of the end beyond today's date and likewise the start if already started
Sue Hannan
Contributor
December 3, 2024

Hi, let me know if you had a chance to look at my steps, @Nick Haller and @Bill Sheboy 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2024

Hi Sue,

In this Atlassian Community, people gather to learn and help one another on a volunteer basis.  Thus, people help when they can.  There are no expectations of when they can / cannot offer time and help.  If you have more urgent timelines for support needs, I recommend starting with your Jira Site Admin to learn what they suggest.  They may suggest using a third-party integration provider for implementing complex scenarios, rather than for production support needs with the Atlassian Support team.  Thanks!

 

Each of the pieces you are noting is an additional scenario to handle.  I recommend trying to implement them one-field-at-a-time, get that one working, and then try the next.

For your steps #5 and 6, how are these field "connections" between Idea and non-Idea issues happening: with automation rules or some other mechanism?

For #9, that seems time dependent, and so could use a Scheduled Trigger rule with JQL to find the upcoming dates, and use those to make changes or create alerting.

 

Kind regards,
Bill

Like Sue Hannan likes this
Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 11, 2024

Hi @Sue Hannan ,

Sorry for the delay, this got lost in my notifications / inbox. I'll address bullet 8 since the others have been touched upon.

If you wanted to copy the Jira delivery's (initiative's) work-type field to the JPD idea's work-type field - when the Jira delivery's (initiative's) work-type field is updated, you could use an automation like this:

ssf1.jpg

^ This automation uses a global field and is applied to both my Jira and JPD projects. Otherwise you would want to replace your JPD field in step 4, and your Jira field in step 5.

 

If you wanted the JPD idea's work-type field to be copied from the Jira delivery's (initiative's) work-type field when the linking occurs, you could use an automation like this one:

ssf2.jpg

^ Again - This also uses a global field and is applied to both my Jira and JPD projects. Otherwise you would want to replace your JPD field in step 4, and your Jira field in step 5.

Also note the Scope of these automations should touch upon both the Jira and JPD projects through either the Multiple projects or Global options. I don't think it's possible to create an automation for both scenarios which is why two are shared above.

 

To also tough upon what @Bill Sheboy mentioned, the Community isn't meant to be treated like a support ticket since this is all volunteer work. Answers are provided to guide you to a solution. Regardless, hope this helps.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2024

Hi @Sue Hannan 

What problem are you trying to solve by doing this?  That is, "why do this?"  Knowing that may help the community to offer better suggestions.

For example, for an Idea in JPD, are you trying to make a field visible from an issue linked as a "delivery ticket" to help coordinate with the Idea's progress?  To initialize an Idea field? And so forth...

Kind regards,

Bill

Sue Hannan
Contributor
November 26, 2024

Thanks, I wrote to both of you above. You are correct I am trying to make a field visible to help see certain attributes for the idea/delivery ticket. In our case, the idea is linked to the 'delivery ticket' so we can get a dashboard view of status and having other attributes visible give better analysis/status when using the JPD view.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events