Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8316075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:16:34+00:00 2026-06-08T21:16:34+00:00

I am looking for simple way to connect information about requirement/release and source code.

  • 0

I am looking for simple way to connect information about requirement/release and source code.
The case is that developer should be able to find any artifacts created given release or CR in easy way.
The idea I have is to introduce some new annotation to mark any new class ( I am not sure if it is good for any new method) for example:

@ArtifactInfo(release="1.2" cr="cr123")

Do you have any other ideas? Maybe you use already something similar?

Take care,
Marcin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:16:35+00:00Added an answer on June 8, 2026 at 9:16 pm

    IMO the code is the wrong place for that kind of information.

    Take a look at the imaginary code below.

    class Authenticator {
    
        login(String username, String password){
            User user = retrieveUserFromDatabase(username);
            throwIfWrongpassword(user, password);
            verifyUserAge(user)
        }
    
        void throwIfWrongpassword(User user, String password){
            //throws AuthenticationException if password is wrong
        }
    
        void verifyUserAge(User user){
            //verify that user is above 18 or account is authorized by a parent
        }
    
        void biometricLogin(String username, BiometricImage bioimg){
            User user = retrieveUserFromDatabase(username);
            verifyBiometricImage(user, password);
            verifyUserAge(user);
        }
    }
    

    This is the result of a few requirements:

    • Users must authenticate to have acces to the system
    • Users can use biometric authentication instead on password auth
    • Underaged users must be authorized be parents or something like that.

    All those requirements were added in different poins of time, on different versions of the software.
    A class-level, or even a method-level annotation won’t suffice to effectively map requirements to code.
    You’d have to use a “line of code”-level annotation.
    Of course, that’s impractical.

    The right way to do that is to follow a few best practices when using the source code repository and the bug tracker:

    • 1) Every requirement corresponds to one or more issues on the bug tracker
    • 2) Every commit message starts with a corresponding issue key, like “PROJ-123 – a nice feature”
    • 3) When you do a release (meaning, incrementing your software version), you tell the bug tracker that those issues were fixed in that version.

    If you need to know what requirements were implemented in what version, ask your bug tracker.

    If you need to know all the code that was produced for a given requirement, ask your source code repository (filter commits by log message)

    If you need to know what is the requirement for a given line of code, ask your source code repository. GIT and SVN have a “blame” command that will tell you, for a given file, for each line of code, who commited it, when, and the commit message (which will have the issue number if everyone on the team is a good boy) – So this will work as that hypothetical “line-of-code”-level annotation.

    Using “commit hooks” can help you enforce rule 2) in an organization.

    Maven has some degree of integration with JIRA and other bug trackers, and maybe it can help automate #3. But I haven’t really used it like that. But if it doesn’t do what you need, you can always ask for more 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a simple/elegant way to grep a file such that every returned
I am looking for simple way to split parenthesized lists that come out of
Looking for a simple way to open a source php file, replace some predefined
I'm looking for a simple way of adding a refresh mechanism to my UIWebView.
I am looking for a simple way to make a piece of text, which
I'm looking for a simple way to translate long to String and back in
I'm looking for a simple way to have this done. I would to have
I am looking for a simple way (UDF?) to establish the similarity between strings.
I'm looking for as simple way to create an identity set. I just want
I am looking for a simple way to detect if a document has been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.