Giter Site home page Giter Site logo

Comments (9)

ctreminiom avatar ctreminiom commented on June 22, 2024 1

I don't think they are related at the moment, the only relation they share now is "asset" in the name.
I only work with Jira Software and Jira Assets, not Service Management. So i may miss knowledge about what the difference of SM and Assets is, not for now i would not merge those.

It's because Assets is a ITSM feature available on the Premium subscription.
image

But after checking, assets is available on the Software and Business projects after enabling it so I would assume the feature scope is global. Having said that, I would think the best approach is create a dedicated module for assets, due it uses the workspace id as reference, not issues.

In Assets a "workspace id" is required, here were my thoughts about how to handle it: andygrunwald/go-jira#495 (comment)

I agree with Andy's response about the first solution, this library is highly inspired on go-jira and the service implementation are very similar to his.

I think the idea, might be good, i preferred using assets.Objecttype.GetAttributes() and assets.Objecttypeattributes.Delete()
So the "keywords" are the same found in the documentation.

You're right.

So Objectype -> Objectype, and not Object.type Why?

I was assuming the Assets endpoints were using the pattern workspace/$workspace_id/object/type/attribute/$attribute_Id, but it's not.

I'll be forward and create the module interfaces on a new branch 👍🏽

from go-atlassian.

Fank avatar Fank commented on June 22, 2024

I can create a PR for it as well, if that is ok?
I would implement it based on https://github.com/ctreminiom/go-atlassian/tree/main/jira/sm, looks lightweight as well.

Forgot to mention the API docs can be found here: https://developer.atlassian.com/cloud/assets/rest/api-group-aql/

from go-atlassian.

ctreminiom avatar ctreminiom commented on June 22, 2024

Hi @Fank, thank you for the interest on this project!

  • It seems the assets feature is related to Jira Service Management so I think it should be under the SM package, what do you think?

  • For the implementation, we can create the sub-services under the Object structure. Something like sm.Object.Schema.Get() sm.Object.Type.Attribute.Delete()
    image

  • I can create a new branch and create the implementation together if you want.

from go-atlassian.

Fank avatar Fank commented on June 22, 2024
  • It seems the assets feature is related to Jira Service Management so I think it should be under the SM package, what do you think?

I don't think they are related at the moment, the only relation they share now is "asset" in the name.
I only work with Jira Software and Jira Assets, not Service Management. So i may miss knowledge about what the difference of SM and Assets is, not for now i would not merge those.

In Assets a "workspace id" is required, here were my thoughts about how to handle it: andygrunwald/go-jira#495 (comment)

I would like to have your feedback about how you would to handle it.

  • For the implementation, we can create the sub-services under the Object structure. Something like sm.Object.Schema.Get() sm.Object.Type.Attribute.Delete()

I think the idea, might be good, i preferred using assets.Objecttype.GetAttributes() and assets.Objecttypeattributes.Delete()
So the "keywords" are the same found in the documentation.

So Objectype -> Objectype, and not Object.type
Why?

e.g. Objecttype has attributes but Objecttypeattribute are the attributes used in objectype.
So it would be object.type.GetAttributes()? and object.type,attribute.Create()?
For me it looks confusing.

from go-atlassian.

Fank avatar Fank commented on June 22, 2024

@ctreminiom could you give me write access so i could help you contributing in #204 .
While implementing it i could test it in our environment, since we are using assets.
We are currently using our own fork https://github.com/mcl-de/go-jira which i badly want to replace.

from go-atlassian.

ctreminiom avatar ctreminiom commented on June 22, 2024

@Fank you should be able to contribute on #204

from go-atlassian.

Fank avatar Fank commented on June 22, 2024

Yes @ctreminiom i have seen it, i am working atm on replacing the go-jira with go-atlassian in our code.
So that i can start testing assets.

from go-atlassian.

Fank avatar Fank commented on June 22, 2024

I just noticed from your comment here #209 in assets are custom fields types available for jira:

POST /rest/api/3/field

{
  "id": "customfield_10191",
  "key": "customfield_10191",
  "name": "SLA Group",
  "untranslatedName": "SLA Group",
  "custom": true,
  "orderable": true,
  "navigable": true,
  "searchable": true,
  "clauseNames": [
    "cf[10191]",
    "SLA Group"
  ],
  "schema": {
    "type": "array",
    "items": "cmdb-object-field",
    "custom": "com.atlassian.jira.plugins.cmdb:cmdb-object-cftype",
    "customId": 10191
  }
}

image

GET /rest/api/3/issue/....

{
  ...
  "fields": {
    ...
    "customfield_10191": [
      {
        "workspaceId": "349b9da4-0000-0000-0000-000000000000",
        "id": "349b9da4-58fc-0000-0000-000000000000:24",
        "objectId": "24"
      }
    ]
    ...
  }
  ...
}

from go-atlassian.

ctreminiom avatar ctreminiom commented on June 22, 2024

@Fank try to pull the latest commit on #204

I added the support for the Asset custom-field extraction

assets, err := models.ParseAssetCustomField(response.Bytes, "customfield_10072")
if err != nil {
log.Fatal(err)
}

for _, asset := range assets {
fmt.Println(asset.Id, asset.WorkspaceId, asset.ObjectId)
}

from go-atlassian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.