-->

Welcome to our Coding with python Page!!! hier you find various code with PHP, Python, AI, Cyber, etc ... Electricity, Energy, Nuclear Power

Showing posts with label jira-python. Show all posts
Showing posts with label jira-python. Show all posts

Tuesday, 2 May 2023

Step by Step how to access the hosted Jira API via python

Here are the step-by-step instructions for accessing the hosted Jira API via Python:

  1. Install the required Python libraries:

    • requests
    • jira

    You can install them using pip:

    pip install requests jira
  2. Log in to your Jira account and navigate to the API tokens page (Settings > Security > API tokens). Generate a new API token and copy it.

  3. Create a new Python script and import the required libraries:

    python
    import requests from jira import JIRA
  4. Create an instance of the JIRA class and pass the Jira URL and API token to it:

    python
    options = { 'server': 'https://your-jira-instance.atlassian.net' } api_token = 'your-api-token' jira = JIRA(options, basic_auth=('email@example.com', api_token))

    Replace your-jira-instance with the name of your Jira instance and email@example.com with your Jira login email.

  5. Test the connection by retrieving a list of issues from Jira:

    python
    issues = jira.search_issues('assignee=currentuser()') for issue in issues: print(issue.key)

    This will print the keys of all issues assigned to the current user.

  6. You can now use the Jira API to perform various operations, such as creating, updating, and deleting issues. Refer to the JIRA library documentation for more details on how to use the API.

That's it! You can now access the hosted Jira API via Python.

Wednesday, 6 October 2021

Agile is a mindset. Agile is behaviour.

All about Agile, Ansible, DevOps, Docker, EXIN, Git, ICT, Jenkins, Kubernetes, Puppet, Selenium, Python, etc
Ahmed Sidkey’s agile mindset image is one I remember fondly when I was presenting at the Agile Alliance conference 2014 in Florida USA. Sidkey depicted a continuum from values to principles and practices.

After seeing it again a few years later when I was presenting at the Agile NZ 2016 conference, and looking at it’s linear flow, I’m now not so sure.

I’ve recently talked with some people across a large program who are now focussing on being agile. I think it’s amazing that they are considering what it means to be truly agile so early in their agile evolution, rather than turning agile frameworks into yet another mindless, follow the proverbial bouncing ball, process and methodology. This form of doing agile, turning it into yet another corporate process, just doesn’t reap any significant benefits in my experience.

An Agile mindset is the combinations of actions and behaviours that result in an agile culture. Encompasses  values, principles, and a disciplined focused approach to using the agile framework as part of contemporary way of working. It is a shift from linear plan driven ways of working towards an adaptive, value driven, customer centric approach.

This mindset is the environment within which agile teams flourish. It isn’t a prerequisite for an agile adoption, nor is it required for a functional agile team. But if this mindset is cultivated and nourished, the teams (and therefore the company) will experience amazing results – happy employees delivering great value and making customers elated with the results.

How to you measure Agile Mindset?

Agile IQ® assesses software and non-software teams on both their actions and behaviours.







x

But as I dug deeper into what people were doing when they said they were being agile, I’ve found the strangest things:

  • Scrum is too hard, so we’ll just say “we’re being agile” and everything will be ok.
  • We’ll reinforce we’re being pragmatic about its use and we “take what works”, even though we have no real experience to base our judgement on “what works”.
  • Being agile is somehow superior to doing agile, so I’m better than you.
  • Agile has too many meetings, so I’ll just say we’re “being agile” and that will excuse us from being in Sprint Planning or going to the Daily Scrum.

Ultimately, most often, what was being heralded as an Agile Mindset was really an excuse not to change the way they worked. They labelled things as “agile” without actually exhibiting any of the expected behaviours.

The strange push of this Agile Mindset phenomenon seemed to fast becoming the Descartes of agile: “I think I am agile, therefore I am”.

Perhaps it was just positive thinking. Maybe if they thought they were agile then they would be agile. 

“The problem with positive thinking is when it disconnects you from reality. If you have achieved your goals in your mind’s eye, studies show you are less likely to consider the concrete actions you need to take and the possible obstacles in the way.”

Wednesday, 17 July 2019

JIRA 5.0, REST API, jira-python, Start/End Date

  1. How to create issues with jira-python or REST API so I could set the Create/Resolve/Close date correctly?
  2. How to set status of the issue created from the above?

Saw this awesome REST API library/wrapper, jira-python, at Atlassian Summit 2012. It seems to give me what i need to perform a heavy migration work of mine.
I think the external project import does not allow multiline description imports, so i have chosen to try using jira-python for my migration work.
How to create issues with jira-python or REST API so I could set the Create/Resolve/Close date correctly?

You have to set the create date in issue creation -- JIRA does that for you. Also, it automatically handles date updating when you transition issues, so you don't have to worry about that either. Take the date fields out of your fields dict and you should be fine.

How to set status of the issue created from the above?

When you create an issue, JIRA will use the issue type's associated workflow to determine what its status is. Once an issue is created, you can transition it to different statuses using the transitions() and transition_issue() methods.

In your case, it sounds like you want to preserve the original times and dates that issues were created. If so, then using the REST API isn't what you want; it uses the same access rules any real user has when they interact with the web application. You'll probably want to do a backup/restore if you want to preserve all the original information -- see http://aclabink.com/21047061/how-to-set-status for details on that.

Rank

seo