GithubHelp home page GithubHelp logo

Comments (4)

replicaJunction avatar replicaJunction commented on August 15, 2024

Hi! Sorry for the delayed response to this; I've had a lot of RL changes recently that have kept me busy.

I hadn't initially designed Set-JiraIssue to accept comments, as that was sort of the purpose of Add-JiraIssueComment, but your use case does make sense.

Are there a lot of fields that trigger this behavior, or is the comment field the primary one you've noticed? If that's the biggest offender, we may be able to add a handler specific to comments in the Fields hashtable.

Your idea for a FieldOperation parameter is a good one, but we'd have to have a way of associating a specific operation with a specific field - or just assume that all fields will use the same operation in a single call. That might take a bit more thought...perhaps a nested hashtable?

$fields = @{
    comment = @{
        add = 'Another insightful comment'
    }
}

Get-JiraIssue -Key "Test01" | Set-JiraIssue -Fields $fields

from jiraps.

replicaJunction avatar replicaJunction commented on August 15, 2024

I still see the use in this feature, but I haven't figured out a good way to do so. I'm adding the "help wanted" tag to see if anyone else wants to chime in with some ideas.

from jiraps.

jjhayter avatar jjhayter commented on August 15, 2024

No worries. I was thinking of a child object something along the lines of PSJiraField that would be a hashtable containing the FieldName and ApiMethodType (Add, Edit, Update, etc). What I am debating is whether or not this becomes too brittle in the long term.

from jiraps.

lipkau avatar lipkau commented on August 15, 2024

@replicaJunction
I see it as to cumbersome to handle comments in this command.
Making the fields has contain the operation add a new layer of complexity only for the comments to benefit from it.
Also, this only usecase this works well is adding a new comment. But that is not was Set- is supposed to do. It is supposed to be able to change the comment (edit).

I recommend adding a line to remove the comment element from the hash, if present and only allow for comments to be managed by dedicated functions.

from jiraps.

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.